Click here to Skip to main content
15,910,358 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My project is about how to detect color in MATLAB.
First, I have to take a photo of a resistor by webcam or camera.
Second, I have to detect the color of the resistor (RGB image) and calculate the value of it. Because there are 10 colors in a resistor, I don't know how to detect each of them.
Please help me. Thanks
Posted

1 solution

Convert the 10 colors in RGB.
Here there is a list of common colors link[^].
A color can then be represended in a 3D domain where the 3 axes are R-G-B.
Plot in that domain also the point relatad to the unknown pixel...then you can recognise the right color computing the distance between this point to the other given 10.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900