Hi,
I would like to analyse filled holes but do not wish to exclude filled holes that are partially surrounded by a broken circle. Is this possible in ImageJ ? In the image below there are 11 filled holes. Of these, 5 are enclosed by broken circles or concave lines. I wish to exclude these 5 filled holes from being analysed by Analyse Particles. Thanks, Justin |
Hi Justin,
looks difficult. The only approach that comes into my mind - it will need some macro programming: Analyze particles with a circularity and size bounds to get only the filled blobs; writing the areas and center coordinates to the Results Table (Set Measurements). Create arrays of these coordinates. For each line of the Results (now in the arrays), create a square selection around the blob center with the maximum size of a partial circle. Then duplicate the selection 4 times; on these images apply all possible flip operations (unchanged, flip horizontally, flip vertically, flip both). Combine the images such that you get an 'or' operation of all lines (with background=0 and lines=255, simply add all images). From the partial circles, this should give you a closed line; if holes may remain, use Binary>Dilate. Then run Analyze particles with and without 'include holes', and see whether the object closest to the center has a larger size with 'iclude holes'; in such a case it is surrounded by a circle. If this is true, doWand on the center position in the original image and delete the object [do Wand on the center assumes there is no U-shaped object where the center is not in the object. If this is a problem, you need also two arrays with the XStart, YStart from the Analyze Particles>'Record Starts' of the original image]. But maybe someone has a more elegant solution... Michael ________________________________________________________________ On Oct 31, 2013, at 10:52, jmcginnity wrote: > Hi, > I would like to analyse filled holes but do not wish to exclude filled holes > that are partially surrounded by a broken circle. Is this possible in > ImageJ ? > In the image below there are 11 filled holes. Of these, 5 are enclosed by > broken circles or concave lines. I wish to exclude these 5 filled holes > from being analysed by Analyse Particles. > Thanks, > Justin > <http://imagej.1557.x6.nabble.com/file/n5005398/Filled_holes4.jpg> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by jmcginnity
Hi,
My initial request was confusing so here is better explanation. Using Analyse Particles I would like to measure the diameters of bubbles in a stack of images. These are images of bubbles that have been processed to yield filled holes. The processing that has been done to get the images was Image Edge - Deriche / Threshold / Fill Holes. The next steps I generally do are: Erode (to remove lines), watershed (to separate any adjoining particles) and then I run Analyse Particles to get the bubble diameters. However, in my measurements, I do not want to include filled holes that are partially surrounded by a broken circle, because these are not bubbles but images of light that passes directly through the centre of the bubbles. I was wondering if there is any routine that I could use prior to Erode that would identify filled holes that have a concave line as a nearest neighbour. If so, I could then reject these. Is this possible in ImageJ ? In the image below there are 11 filled holes. Of these, 5 are partially enclosed by broken circles or concave lines. I wish to exclude these 5 filled holes from being analysed by Analyse Particles. Thanks, Justin |
Free forum by Nabble | Edit this page |