I am working in MATLAB to get a region where colors are similar.
I'm successfully manipulate the image in order to separate object (stars) from background and these are filled of black(and near black color).
Now, how can I get the region where some pixels are of the "same" color?
I know there is Image Processing Toolbox but I want to do this myself. Can you you give me some advice in order to create a simple alghorithm?
Here there are all image and some black region.
My purpose is to get a rectangle from region which is fulfilled with only near BLACK pixels.
Example (I'm using a threshold of 30)
0,0,0 [MIN COLOR]
20,10,16
...
30,30,30 [MAX COLOR]
Now I'm trying to understand Moore neighborhood alghorithm but other help is appreciated.