Regarding color detectin and recognition

2 views (last 30 days)
Chetan
Chetan on 15 Feb 2014
Commented: Image Analyst on 16 Feb 2014
Greetings .. i have been seing ur posts and the help u r providing... i am new to matlab and looking for help in color detection and recognition .. please let me if there are any inbuilt commands or codes available...

Answers (1)

Image Analyst
Image Analyst on 15 Feb 2014
Not sure who "ur" and "u" is, but have you seen my posts or File Exchange : http://www.mathworks.com/matlabcentral/fileexchange/authors/31862 Lots of color demos there.
Also see Professor Stephen Westland's Computational Colour Science code (that accompanies his book on the subject): http://www.mathworks.com/matlabcentral/fileexchange/?search_submit=fileexchange&query=westland&term=westland
  2 Comments
Chetan
Chetan on 16 Feb 2014
Could u be more specific on which one of those multiple codes be helpful to me in detecting a specific color and recognizing the same.. All i need is a snapshot which has red (for example) should be able to remove rest of the elements and show only red(which i was able to do so far) and now i want the system to know that it has detected red...!!
Thank u so much for the help
Image Analyst
Image Analyst on 16 Feb 2014
Did you notice that the screenshot for http://www.mathworks.com/matlabcentral/fileexchange/31118-color-segmentation-by-delta-e-color-difference has detected all the red objects in the image ? That seems like a natural one to try first.
Regarding "knowing" that it has detected red, just sum up the red mask image
redPixelsExist = sum(redMask(:)) >= 1;
If there is at least one red pixel, redPixelsExist will give you a true value, otherwise if no red is there redPixelsExist will be false.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!