I am trying to detect colors in a color jpeg image. The image has white (almost) background with some colored lines on it. Till now what i have done is to read the image and get the RGB values in vectors. To detect a certain color on the image, first I open the image using imshow, pick some pixels of colors I am interested in and note down their RGB values in a file (lets say RGB.dat). I read this file and find mean and standard deviation for RGB.
Now I read one pixel at a time from the original image and save the pixed location where the RGB values are within a certain tolerance level of the ones I picked manually saved in RGB.dat
I tried to do this on a couple of pictures and it works ok. But for both these pictures I actually had to create RGB.dat manually. Problem is I have around 500-600 pictures to go through and each one of them might have 1-8 colors that I want to detect !!! Is there a way to actually automate this in some way which doesn't require me to go through every picture before I do the color detection.
Thanks a ton.