Login  Register

Re: Analyze Particle -> Perimeter

Posted by Gabriel Landini on Jul 18, 2006; 11:02pm
URL: http://imagej.273.s1.nabble.com/Analyze-Particle-Perimeter-tp3702116p3702118.html

On Tuesday 18 July 2006 19:16, Jonathan Hilmer wrote:
> I'm not entirely sure how or
> when the object in ImageJ becomes associated with or interpreted as a
> Java shape, but the perimeter ultimately comes from stepping around
> the border of an ImageJ object defined by a Java class.

Regarding he Particle Analyzer, Wayne told me once that:

"I looked the code and it calculates the length of the particle boundary
and subtracts 2-sqrt(2) for each non-adjacent corner, where adjacent
corners are those that are 1 pixel apart. For example, a one pixel
particle has a boundary length of 4 and 4 corners (but only 2 or
counted) so the perimeter is 4-2*(2-sqrt(2)) or 2.8284. For the cross,
the boundary length is 12 and there are 6 non-adjacent corners so the
perimeter is 12 - 6*(2-sqrt(2)) or 8.4853. It helps to zoom in to 3200%
so you can easily see the edges and corners of small particles."

There are other definitions of "perimeter". For instance the Particles8_Plus
plugin calculates it using the Freeman algorithm (stepping along the
perimeter and counting a distance of 1 between side-neighbours and sqrt(2)
between corner-neighbours

The perimeters of the same particles measured with the 2 procedures are
different. Which one is right? Both are because the definition of perimeter
is different.

Cheers,

Gabriel