I need to select all pixels in a image that are similar in color to a given one.
My current approach is to get the hsv values for this pixel and calculate the distance to each pixel in the image being
distance = abs(ref.h-pix.h) + abs(ref.s-pix.s) + abs(ref.v-pix.v);
And select the pixels bellow certain distance.
Is there any other preferred method?