MATLAB: Get the position of pixels with specifed color

image processing

Hi! I have a problem.I have a picture with two circle in it.A red and a green.I want to get the postion of their centers and connecting them and how can I get the position of all red pixel in that picture.Please help me and thanks a lot

Best Answer

I answered about finding the positions a moment ago in response to your earlier post.
For the matter of finding all the red pixel in an image, first you have to define what "red" means. If a pixel has red turned on as high as it can go also happens to have blue turned on to (say) 1/10th of the maximum, then is that pixel still "red" ? If so, then how far could the intensity of the red component be reduced and you would still deem the pixel to be "red" instead of "purple" ?
Related Question