Giter VIP home page Giter VIP logo

colorwheelhsv's Introduction

ColorWheelHSV

HSV Color Wheel, by Shervin Emami ([email protected]), 6th Nov 2009. HSVFiltering part added by Gabor Vasarhelyi ([email protected]), since Jan 2011.

Current version: 1.1.1 Build 71

This code lets you select HSV colors and color ranges (radius around base color in HSV color space) for colored blob detection.

install

Code tested on linux and Windows.

prerequisites

  • The code relies on OpenCv 2.x/3.x, you should install that first (yes, I know, it is old, I will upgrade only if you really need it). I tested it with versions 2.4.13 and 3.2.0 and both work fine.

  • Using CUDA is also recommended for speedup.

linux

On linux, run ./bootstrap.sh which creates build, in which you can make.

If you want to experiment with different OpenCV versions, change the explicitely given version in CMakeLists.txt in the line find_package( OpenCV ... REQUIRED ).

windows

For Windows, code was only tested in Visual Studio. There you need to setup your environment properly. The file called user_macros.props might be of help.

usage

An input image or video file is needed as a first argument.

Click on the top Hue map, or the bottom Color graph to change values.

mouse events

  • LEFT button: change values to 3x3 neighbor average color. Do not change range.

  • Shift+LEFT button: Average colors. Do not change range.

  • Ctrl+LEFT button: save current color and range and draw it on the palette.

  • Ctrl+Shift+LEFT button: clear all saved colors+ranges.

  • RIGHT button: include this pixel to new range as tight as possible.

  • Shift+RIGHT button: undo last mouseclick or console color input

  • Ctrl+RIGHT button: undo last mouseclick or console color input

  • Ctrl+Shift+RIGHT button: reset inclusion of multiple colors

keyboard shortcuts

Note: these work only when the image window is the active one.

  • nN - next frame
  • fF - 100 frame forward
  • h,s,v - start writing a number in the console, on Enter it will update color.H, .S, .V, respectively
  • H,S,V - start writing a number in the console, on Enter it will update color.rangeH, .rangeS, .rangeV, respectively
  • c,C - start writing three numbers in the console with space between, on Enter it will update all color.H, .S, .V
  • r,R - start writing three numbers in the console with space between, on Enter it will update all color.rangeH, .rangeS, .rangeV
  • d/D - draw red circles and show area/diameter around none/largest/all blobs
  • x/X - change highlight color (blue, green, red, white)
  • BackSpace - undo last color or range selection (of mouse clicks or console input)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.