Regarding color detectin and recognition

2 次查看(过去 30 天)
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...

回答(1 个)

Image Analyst
Image Analyst 2014-2-15
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 个评论
Chetan
Chetan 2014-2-16
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 2014-2-16
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.

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by