Can someone help me with this crazy algorithm please? I need to find some exact color (R,G,B model) pixel in pictures. And I need one algorithm for more pictures. I need to find one of 3 good colors against 9 bad colors in every picture with one algorithm. Do you think it's possible?
In picture you can see 3 good colors (R,G,B model) (yellow background) and 9 bad colors (green background). And I need an algorithm to chose one of the good colors when I will compare all these colors.
I have got 3 this pictures with different good and bad colors. And I need to find one algorithm, for all these pictures, that will choose one from good colors before all of bad colors in specific picture.
One algorithm, that when I use it for first set of numbers will chose each one of good (yellow) colors. and when I apply this same algorithm for second picture, it will choose one of good (yellow) colors from set of numbers for picture two and same algorithm for third picture (set of numbers).
You can find numbers in written form in xlsx file here: xlsx file
Do you think it's possible?
EDIT: i make some change in picture 3 ... and i upload new xlsx file
I compare individual pixel in bmp file something like
for (int x = 0; x < img.Width; x++)
{
for (int y = 0; y < img.Height; y++)
{
GetPixel(x, y).Color
}
}
and i get 3 numbers (x, y).R, (x, y).G, (x, y).B
And im finding most red pixels (there is red dot in picture) but with different lighting this red pixels can have different levels of R,G,B model. In picture 3 you can see that when is R level bigger then G and B lvl
if ((R-30>G) && (R-30>B))
it will find me only good colors (yellow background) in picture 3. But when in picture arent this colors like in picture 2.. i need use something else to find good color. But i need to combine these conditions to one algorithm that when i use for picture 3 it will find me good colors (yellow background) for this picture and when i use it on second picture it will find my good pixels for second picture...
EDIT2:
So here are 3 pictures. In pictures is one red thing (in yellow circle) but with different lighting. And interference (green circle). So pixels in yellow circle have got RGB model like are numbers with yellow bacground (good color) and in green circle have got RGB model like are numbers with green bacground (bad color).