MATLAB: Colour segmentation on resistor color band and calculate the value

colour segmentationImage Processing Toolboxresistor

I'm a beginner to Matlab. I need to do a color segmentation on a resistor color band, identify the color and do a calculation based on the color. Any guideline for this?

Best Answer

I have color segmentation tutorials here if you're interested: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862. Basically you need to find the regions of interest first - the bands. You might use a variety of techniques depending on how repeatable the lighting and positioning are from image to image. Then you can look at the mean RGB value of each band and see which "master" color it's closest to. If the band is closer red color than any other, then assume it's red.