comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: IDLanROI Confusion
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDLanROI Confusion [message #24568 is a reply to message #24560] Wed, 04 April 2001 14:47 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
davidf@dfanning.com (David Fanning) writes:

> Folks,
>
> Alright. I admit it. I don't get it. :-(
>
> I want to use the IDLanROI object to calculate
> the perimeter, centroid, and area of a region of interest.
> But I'm not sure the values can be trusted. Here is an
> example.
...
> Here are the results. 15% error in the perimeter is pretty large!
>
> Calculated Perimeter: 362.61017
> Expected Perimeter: 314.159
> Discrepancy in Perimeter (percent): 115.42240%
>
> Calculated Area: 7691.5000
> Expected Area: 7853.98
> Discrepancy in Area (percent): 97.931216%
>
> Calculated Centroid: 199.50135 200.25225
> Expected Centroid: 200 200
>
> Am I doing something wrong, or should I believe these numbers?
> The same exercise with a square region produced accurate numbers.
>
> My expected ROI's are not squares or circles, but they are
> much closer to circles than squares.

What do you mean, they aren't squares or circles? If it isn't a
circle then you won't get a perfect match to the theory, right?

More than likely the region of interest becomes pixelated into square
pixels. It's pretty clear to me that this will give a greater
perimeter than a true circle since there are more horizontal and
vertical segments than are required.

What happens if you make the circle much much bigger? I think then
the answers will converge to what you expect.

Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: long to float
Next Topic: Index of a sector

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 16:12:32 PDT 2025

Total time taken to generate the page: 0.00453 seconds