negative centroid values

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

negative centroid values

Gwen Barnes
Hi folks,

I'm trying to find the centroid of a circular object, but I sometimes get
negative (!) values for X or Y.

I outline it with the polygon tool, under "set measurements" I chose area,
centroid, and feret's diameter, and then I select "analyze, measure."  Most
of the time this works fine.  However, if I encompass too large an area, I
get negative values for either X or Y of the centroid.  My image is a 41 M
tiff, 2552 pixels wide by 4200 pixels high.  My latest results from
"measure" were:

area: 1210035
X:    1357.474
Y:    -1649.551
diam:    1343.317

Whereas the actual values should be about:

X:  1344
Y:  1944
diam: 1308

In this case, maybe the Y value is the only incorrect one, but since there's
no way the answer could be negative, it makes me distrust all the values.

Is anyone else familiar with this problem, and does anyone have suggestions
for getting the right answer?  Thanks.

-Gwen

--
01000111011101110110010101101110
010000100110000101110010011011100110010101110011
Reply | Threaded
Open this post in threaded view
|

Re: negative centroid values

Wayne Rasband
Search the release notes for "centroid" and you will find this:

   v1.37g, 15 May 2006
       Fixed a bug that could cause calculated centroid
       coordinates to be incorrect with large images.

-wayne

On Jul 19, 2006, at 3:02 PM, Gwen Barnes wrote:

> Hi folks,
>
> I'm trying to find the centroid of a circular object, but I sometimes
> get
> negative (!) values for X or Y.
>
> I outline it with the polygon tool, under "set measurements" I chose
> area,
> centroid, and feret's diameter, and then I select "analyze, measure."  
> Most
> of the time this works fine.  However, if I encompass too large an
> area, I
> get negative values for either X or Y of the centroid.  My image is a
> 41 M
> tiff, 2552 pixels wide by 4200 pixels high.  My latest results from
> "measure" were:
>
> area: 1210035
> X:    1357.474
> Y:    -1649.551
> diam:    1343.317
>
> Whereas the actual values should be about:
>
> X:  1344
> Y:  1944
> diam: 1308
>
> In this case, maybe the Y value is the only incorrect one, but since
> there's
> no way the answer could be negative, it makes me distrust all the
> values.
>
> Is anyone else familiar with this problem, and does anyone have
> suggestions
> for getting the right answer?  Thanks.
>
> -Gwen
>
> --
> 01000111011101110110010101101110
> 010000100110000101110010011011100110010101110011
>
Reply | Threaded
Open this post in threaded view
|

Re: negative centroid values

Gwen Barnes
Great, thanks!

-Gwen

On 7/19/06, Wayne Rasband <[hidden email]> wrote:

>
> Search the release notes for "centroid" and you will find this:
>
>    v1.37g, 15 May 2006
>        Fixed a bug that could cause calculated centroid
>        coordinates to be incorrect with large images.
>
> -wayne
>
> On Jul 19, 2006, at 3:02 PM, Gwen Barnes wrote:
>
> > Hi folks,
> >
> > I'm trying to find the centroid of a circular object, but I sometimes
> > get
> > negative (!) values for X or Y.
> >
> > I outline it with the polygon tool, under "set measurements" I chose
> > area,
> > centroid, and feret's diameter, and then I select "analyze, measure."
> > Most
> > of the time this works fine.  However, if I encompass too large an
> > area, I
> > get negative values for either X or Y of the centroid.  My image is a
> > 41 M
> > tiff, 2552 pixels wide by 4200 pixels high.  My latest results from
> > "measure" were:
> >
> > area: 1210035
> > X:    1357.474
> > Y:    -1649.551
> > diam:    1343.317
> >
> > Whereas the actual values should be about:
> >
> > X:  1344
> > Y:  1944
> > diam: 1308
> >
> > In this case, maybe the Y value is the only incorrect one, but since
> > there's
> > no way the answer could be negative, it makes me distrust all the
> > values.
> >
> > Is anyone else familiar with this problem, and does anyone have
> > suggestions
> > for getting the right answer?  Thanks.
> >
> > -Gwen
> >
> > --
> > 01000111011101110110010101101110
> > 010000100110000101110010011011100110010101110011
> >
>