I have two groups of dots that both contain noise between them:

enter image description here

The line that separates the two groups in the picture is diagonal in shape. I tried to use morphological filtering on this image to remove the noise between these two groups but failed.

This is the code that I tried to run on this image:

from skimage.morphology import opening, square

new_image = opening(image, square(3))

It did remove a little bit of noise, but not enough for them to become two distinct groups.

I am using DBSCAN on the new_image and DBSCAN still treats them as one group.

I would like to know whether I am giving the correct argument to the function opening. Or maybe there is some other way (better way) to remove the noise between the two groups?

  • $\begingroup$ DBSCAN definitely can do this with the right parameters, but dinner of the points on the right will be noise. But for a single image you don't need such automatization at all - how many such images do you have? $\endgroup$ Sep 15 '19 at 6:59
  • $\begingroup$ I have 6400 images $\endgroup$
    – tamarlev
    Sep 15 '19 at 19:05
  • $\begingroup$ can you tell me what parameters dbscan should be provided to separate it to two groups? $\endgroup$
    – tamarlev
    Sep 15 '19 at 19:12
  • $\begingroup$ Well, there will always be the split of group in the bottom left, too. There are many parameter settings that are good. I'd try radius 3 and minpts 10 for example, but why don't you just try some values - this is 2d pixels, you can find good values just by counting or ticking boxes in paper. Then show so!e difficult images along with the best results you got. $\endgroup$ Sep 15 '19 at 22:59
  • $\begingroup$ dbscan do not contains parameters as radius or minpts, it contains eps, min_samples, metric etc' $\endgroup$
    – tamarlev
    Sep 16 '19 at 5:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.