[ImageJ-devel] Labeling / segmentation proposal for imglib

Gabriel Landini G.Landini at bham.ac.uk
Tue Nov 16 16:14:23 CST 2010


On Tuesday 16 November 2010 20:26:13 Lee Kamentsky wrote:
> Hi all,
> I'm looking to possibly add some support for representing segmentation
> results in ImageJ 2.0 / imglib. The enclosed document discusses the
> rationale for labeling as something distinct from ROI and proposes an
> implementation strategy; I'd like comments.

Unless I missed it, one also wants to have the StartX StartY (and StartZ?)  
coordinates as these are necessary for blob binary reconstruction. I use this 
extensively. This pixel is the one that gets detected first for each blob 
during a raster scan of the image.

Sorry I cannot provide it right now (I have it at work, will do tomorrow) but 
the other day I found a relatively "new" reference of an alternative approach 
to blob labelling "as you go along" that has some advantages (speed) over the 
traditional labelling algorithm (label first, extract geometric descriptors 
later). Funnily this "new" approach is what I use in Particles4 and Particles8 
plugins. I originally wrote the algorithm in N88-BASIC in 1988 during my phd 
work running on a 286 cpu on 16 colours(!).

Note that one can be quite creative to produce efficient algorithms when 
analysing blob morphological descriptors because many of these descriptors 
depend on other descriptors, so there are advantages on computing the 
labelling and parameters in certain order (I mentioned this in my talk at the 
2008 Lux conference, including a table of related parameters).
So my suggestion (if this is to be implemented in ImgLib or similar) is to 
compute certain sets of parameters in blocks and only then display those set 
in a Set Measurements dialog rather than branching for each blob which 
parameters to compute.

For example, if one computes the perimeter of the blob (and for this I would 
strongly suggest to use Freeman's algorithm) then the convex hull and then the 
Feret diameter and breadth can be computed with very little further effort (eg 
it is faster to compute the Feret from the convex hull than from the 
perimeter). Also the area of the polygon defined by the perimeter (which 
!=number of pixels) can be computed in the loop that goes around the blob 
perimeter by just adding 1 further line of code.

I can expand on this if required.

Regards

Gabriel




More information about the ImageJ-devel mailing list