I am dealing with this kind of image
(lower is raw) So, first I converted the grayscale image into pure black and white binary image. I am interested in detecting the white blobs, and want to get rid of the arc-like smears in the corners. How can I do that?
I general, I know that my targets are almost circular in shape, not too big, but I want to encode something that automatically gets rid of everything else, like the lighter arcs in the upper left and right corners.
How would I do this in python
, ideally skimage
?
You can just detect circle of the right size with skimage's methods
hough_circle
andhough_circle_peaks
and cut it out.Here I adapted my previous answer to your other question to do this:
Output:
Again, as in my previous answer, most of the code here is doing "hierarchy" computation to find the biggest best fitting circle.