0
$\begingroup$

I have this binary image with some blobs of random sizes. enter image description here

I would like to convert the blobs into circles of uniform diameter. it doesn't really matter what diameter but they need to be circles and uniform. Here is what I am looking for.

enter image description here

I am working with tiff sequences in ImageJ. I tried erosion and dilation. I tried Ultimate point to reduce to a point and then dilate up but that creates a square. I tried distance map but didn't get very far. Although i am pretty sure distance map is the way to go. None of my current approaches are satisfactory.

If I could do

   #pseudo-code
   if area(blob) > x
   then make circle(diameter=y)
   else remove blob

would be even better.

If anyone has a solution using ImageJ or Python SciPy or even R, please let me know. I would very much appreciate that. Thanks.

$\endgroup$
1
  • $\begingroup$ Simply draw a circle at the center of mass of each Contour! $\endgroup$
    – Balaji R
    Oct 6, 2015 at 12:17

1 Answer 1

1
$\begingroup$

Here is the procedure to follow:

  1. Threshold your image
  2. Obtain connected components - each distinct blob in the image gives you a component.
  3. For each component, find the boundary pixels. Each boundary is represented as a set of points.
  4. Fit one circle per each boundary point set. You could use a simple least squares fitting.

This should give you pretty good circles. You could do this in many languages, using the standard image processing libraries.

$\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.