Posted by
Gabriel Landini on
Mar 05, 2008; 10:11am
URL: http://imagej.273.s1.nabble.com/negative-centroid-values-tp3697001p3697004.html
On Wednesday 05 March 2008 05:35:03 Gwen Barnes wrote:
> I'm running ImageJ 1.39t on Mac OSX v.10.5.2. I'm working with a 29MB,
> 8-bit, 5558x5558 pixel jpg image. When I calculate the centroid of a
> polygon (fairly circular, ~2800 pixels diameter) in the center of the
> image, I get negative values for the centroid. Is there a way to correct
> this?
Since your image is quite large, this sounds like a variable overflow
somewhere.
Until this is fixed, you could try the Particle8_plus plugin at my site (in
the Morphology zip archive).
I do not know if the computation of is exactly the same (in my plugin, I
calculate the centre of mass instead of the centroid). Since the centroid is
usually computed from the perimeter pixels, you could extract the perimeter
(using the boundary8 macro in the same archive) and compute the centre of
mass of the resulting boundary.
Actually I do not think I have tested my plugin with such a large image either
(and I wonder if it would overflow somewhere else too). I would be grateful
(if it is not too much trouble) if you could test this plugin and mail me the
Result Table values that you get (if you can compress the *thresholded
binary* image to a manageable size, it would help me to check the plugin
too).
http://www.dentistry.bham.ac.uk/landinig/software/software.htmlCheers,
Gabriel