0

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.

M--
  • 25,431
  • 8
  • 61
  • 93
tuttomax
  • 59
  • 1
  • 1
  • 5
  • 1
    Are the green, yellow and red pixels in the second image "near black" colors? What is your desired output? Do you want an image? Do you want a pixel list? – beaker May 04 '17 at 17:51
  • It seems you're trying to solve this problem: http://stackoverflow.com/questions/2478447/find-largest-rectangle-containing-only-zeros-in-an-n×n-binary-matrix – beaker May 04 '17 at 18:58

0 Answers0