Login  Register

Re: How to use IJBlob shape filter to remove blobs inside incomplete circles/ellipses

Posted by jumpfunky on Oct 21, 2015; 10:15am
URL: http://imagej.273.s1.nabble.com/How-to-use-IJBlob-shape-filter-to-remove-blobs-inside-incomplete-circles-ellipses-tp5014694p5014696.html

Just to correct my unreadable sentence:

I would generate a new image which contains ONLY the incomplete
ellipses by setting the solidity range to 0-0.8.

Am Mittwoch, den 21.10.2015, 12:08 +0200 schrieb Thorsten Wagner:

> Dear Justin,
>
> I think to use the solidity is the right thing to start with. I would
> generate a use image which contain the ONLY the incomplete ellipses
> by setting the solidity range to 0-0.8. I also draw the convex hull
> around each incomplete ellipse.
>
> My idea was to combine both the original image and the new image.
> Please find attached my result. This is the macro leading to these
> results:
>
> run("Duplicate...", " ");
>
> //Get Incomplete ellipses and draw convex hull
> run("Shape Filter", "area=0-Infinity area_convex_hull=0-Infinity
> perimeter=0-Infinity perimeter_convex_hull=0-Infinity
> feret_diameter=0-Infinity min._feret_diameter=0-Infinity
> max._inscr._circle_diameter=0-Infinity
> long_side_min._bounding_rect.=0-Infinity
> short_side_min._bounding_rect.=0-Infinity aspect_ratio=1-Infinity
> area_to_perimeter_ratio=0-Infinity circularity=0-Infinity
> elongation=0-1 convexity=0-1 solidity=0-0.8 num._of_holes=0-Infinity
> thinnes_ratio=0-1 contour_temperatur=0-1 orientation=0-180
> fractal_box_dimension=0-2 option->box-sizes=2,3,4,6,8,12,16,32,64
> draw_holes draw_convex_hull exclude_on_edges");
>
> //Make it binary again
> setAutoThreshold("Default dark");
> setOption("BlackBackground", true);
> run("Convert to Mask");
> run("Close");
>
> //Fill holes
> run("Invert");
> run("Fill Holes");
>
> //Now combine the new image and the original image
> selectWindow("Testimage1.jpg");
> run("Invert");
> imageCalculator("Subtract", "Testimage1.jpg","Testimage1-1.jpg");
> selectWindow("Testimage1-1.jpg");
> close();
> selectWindow("Testimage1.jpg");
> run("Invert");
>
> Cheers,
> Thorsten Wagner
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html