Cover all 2D points given a 2D template with minimum distance between them

23 Views Asked by At

I am looking for an algorithm that gets a binary image similar to the below image

enter image description here

and given a circle(as a template) with radius R, returns the location of instances of this circle needed to cover all the points, while having the minimum distance between each circle, that is for example:

So far I have been thinking maybe with cross correlation or convolution one can achieve this goal but am not sure yet. enter image description here