Tuesday, February 24th, 2009, 1077 days ago
Color recognition using openCV
This is the one part of object recognition module exploring of openCV. Until now, i have successfully detected and recognized circle, rectangle and color which is presented here today. And next step is hand gesture recognition.
In color recognition, it can detect any color, but there’s still a little bug that, the detectation color should be preset before recognizing the objects in the destination image. I am not sure whether there’s any color filter in openCV like Actionscript3 which can just directly filter the necessary color objects.
Source code colorrecg.pdf
POSTS MAY BE OF INTEREST
- The error of ‘VIDIOC_QUERYMENU: Invalid argument’
- HIGHGUI ERROR: V4L: index 0 is not correct
- Capturing images from webcams using openCV in Ubuntu 11.04
- Fixing ‘[libavutil/libavutil.so.51] Error 1′ in ffmpeg make for openCV 2.3.1 install
- Installing openCV in Ubuntu with pandaboard part 5 – running openCV 2.3.1 examples
- Installing openCV in Ubuntu with pandaboard part 4 – compiling openCV 2.3.1
- Installing openCV in Ubuntu with pandaboard part 3 – the network proxy
- Installing openCV in Ubuntu with pandaboard part 2
- Installing openCV in Ubuntu with pandaboard part 1
- OpenCV mailing list – a collection of resources
- A review of people counting using openCV part 2
- A review of people counting using openCV part 1
- Using webcams/motion sensing cameras in OMAP-based pandaboard
- Doing openCV in pandaboard 3 – successful installation
- Doing openCV in Pandaboard 2 – installing ubuntu 11.04
I have interested in color recognition.
[...] Related Post: Color recognition using openCV [...]
Actually, there are 3 methods to recognize the colour objects which are:
1) using histgram to match the destination image;
2) using cvSetImageCOI to get specific color channel;
3) using cvSplit & cvMerge to manipulate channel to get the target colours.
there i put on another post about color recognition using openCV here as well as some parts of codes, hope it will be useful: http://www.iandol.com/research/882.htm
Hi, interesting post. I have been thinking about this topic,so thanks for writing. I’ll likely be coming back to your blog. Keep up great writing
Thanks.
These days i am quite busy with some investigations, once get time, i will continue to post the latest recognition function applications by using openCV.
waiting to know the robust recognition functions..
Thank!
I ‘m very interested in color recognition
hope it helps.
is the color recognition code given is the full one?
yes it is
can you give a sample program on the color recognition???
thanks….
Am doing project in olor detection and mouse controls in visual c++. can i just get the code for that.i have been trying it in open cv.
@Aarathi
actually there are two parts of codes of mouse control using object detection, one part is object detection, and the other is to control the mouse in the system which can be referred here
http://www.andol.info/research/1756.htm
can i get the header files used?
sir its showing the error 1>c:\opencv2.1\projects\large\large\new.cpp(174) : error C2040: ‘==’ : ‘int’ differs in levels of indirection from ‘const char [2]‘
i got stuck with some errors…
1>—— Build started: Project: large, Configuration: Debug Win32 ——
1>Compiling…
1>new.cpp
1>c:\opencv2.1\projects\large\large\new.cpp(19) : error C2146: syntax error : missing ‘;’ before identifier ‘–’
1>c:\opencv2.1\projects\large\large\new.cpp(19) : error C2065: ‘–’ : undeclared identifier
1>c:\opencv2.1\projects\large\large\new.cpp(19) : error C2146: syntax error : missing ‘;’ before identifier ‘rect’
1>c:\opencv2.1\projects\large\large\new.cpp(26) : error C2146: syntax error : missing ‘;’ before identifier ‘–’
1>c:\opencv2.1\projects\large\large\new.cpp(26) : error C2065: ‘–’ : undeclared identifier
1>c:\opencv2.1\projects\large\large\new.cpp(26) : error C2146: syntax error : missing ‘;’ before identifier ‘rect’
1>c:\opencv2.1\projects\large\large\new.cpp(150) : error C2065: ‘“mainWin”’ : undeclared identifier
1>c:\opencv2.1\projects\large\large\new.cpp(151) : error C2065: ‘“mainWin”’ : undeclared identifier
1>c:\opencv2.1\projects\large\large\new.cpp(167) : error C2065: ‘“mainWin”’ : undeclared identifier
1>c:\opencv2.1\projects\large\large\new.cpp(170) : error C2065: ‘‘q’’ : undeclared identifier
1>c:\opencv2.1\projects\large\large\new.cpp(174) : error C2446: ‘==’ : no conversion from ‘const char *’ to ‘int’
1> There is no context in which this conversion is possible
1>c:\opencv2.1\projects\large\large\new.cpp(174) : error C2040: ‘==’ : ‘int’ differs in levels of indirection from ‘const char [2]‘
1>c:\opencv2.1\projects\large\large\new.cpp(193) : error C2065: ‘‘q’’ : undeclared identifier
1>Build log was saved at “file://c:\OpenCV2.1\projects\large\large\Debug\BuildLog.htm”
1>large – 13 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
@aarathi
check your codes, make sure they are all correctly defined and referred. The error may be caused by incorrect use of the variables.
thank u…………..sir……
Hello Sir,
I am newbie in opencv, i m trying to use image recognition to recognise an apple and haar training seems to be only way of doing it…Can u explain the haar training method in detail may be in different post for those who are doing it for the first time…documentation doesnt seems to be of great help….M sure it’l be extremely useful for all who are aspiring to do the haar training:)
Thank you Sir.
Hello sir,
May i get any Literature Survey on color detection and recognition…
thank you.
Hello sir,
I have been working on analysing time for color detection from video or real time.For this i am detecting colors from the motion of a person in video and synchronising the movements of graphical robot in opengl with this.
Problem i am getting is when i call color detection and than making of robot in main(), than it stops after taking one frame because of glutMainloop();
I am not able to find out the solution so that I could run the designing of robot in opengl and detecting the moments from a video in opencv IN A LOOP simultaneously.
Got it sir..