How can I find the color of an Object ?

Am working on different codes on MATLAB and am wondering if it possible to detect the color name by having Red, Green, and Blue channels Mean Value ??

2 Comments

Stephen23
Stephen23 on 30 Sep 2017
Edited: Stephen23 on 30 Sep 2017
Download my FEX submission colornames:
It converts from RGB to colorname, and from colorname to RGB.
Am trying to RUN the m file but there is always an error :/

Sign in to comment.

 Accepted Answer

Get the RGB color using standard methods, then convert to a name using the color thesaurus for your language. There are thousands of different color names there.

7 Comments

The question here is for example there are different shades of the color 'RED' in RGB the pure color vector is RED = [255 0 0], what if there was a shade how can I find the range of all possible REDs ?? The same question here is also related to all HUEs values possible for the RED color in HSV color space, I wish you could help me as all your tutorials helped me so :)
Yes, there most likely are. Use the Color Thresholder app on the Apps tab, or call the colorcloud() function to get a 3-D plot of all the colors that are in the image.
Hello Image Analyst,
I want to find the color of one objects in a complete image which might have many different color objetcs in the same image. Like i want to find the color of mirror frame of a car so how could i get the coordinates of mirror frame and later how to find the color of the same. Please help.
You need to segment out the objects of interest. Again, you might be able to use the Color Thresholder. Did you use, or even try, that? Otherwise, you'll have to come up with something that can give you the mirror frame, like deep learning.
Thank You for your reply sir,
I used your tutorial about template matching using normalised cross correlation to find the best match but in some cases it does not find the template properly in the original image. Like in my case i could use this mirror frame image as template to first find the position of the same in original image. But the images which are bit different like if there is some scale or rotation in the original image it doest not finds its properly. How could i find the best match even if there is little amout of scale or rotation is present.?? Later i would find the difference between rgb value matrix to find that if the color also matches giving some thresold. Is it right approach or i am missing something??
Not having seen any of your images, I have no idea. If your mirror frames are all different shapes, sizes, styles, and colors you might have to use deep learning. Normalized cross correlation (template matching) would definitely not be the way to go in that situation.
MirrorFrameImg.jpg
This is my image i want to find the color of this frame, and to find the position of this image i would do template mathcing i could store all the different mirror frame images in database then i would apply template matching with the new images that is test images. And later finding the difference between pixel value of rgb could i say which color it is .?

Sign in to comment.

More Answers (1)

Selva Karna
Selva Karna on 30 Sep 2017
u Can use pixel list on which color u want?

Categories

Find more on Image Processing and Computer Vision in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!