1
$\begingroup$

I'm programming in matlab. I have processed image:

enter image description here

How can I separate them some thing like this:

enter image description here

In other words, I want to separate points that are near together without morphological operations.

I note that I do not want to use morphological operation such as dilation or erosion.

$\endgroup$

2 Answers 2

1
$\begingroup$

I have a simple solution for your problem, hope it helps. You might use a clustering method, as I explain in following:

  1. Assume a certain window size (like $k*k$) as neighborhood.
  2. for each and every pixel count number of bright (non-zero) pixels in the neighborhood.
  3. Choose local maximums (pixels with most populated neighborhood), if there is other local maximums in that region, simply ignore them.
  4. Select that pixel and its neighbors as a cluster.

You might add some modifications to above simple procedure, like merging clusters which are too near to each other and indistinguishable.

$\endgroup$
0
$\begingroup$

As @mMimSaas said, the standard method for this is clustering. I won't explain the method and algorithm as the Wikipedia page covers all the subject in a very clear way and there are links everywhere to different methods.

I'll advise you a density-based method as your clusters seems pretty dense.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.