[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*Subject*: Re: IDLanROI Confusion*From*: Craig Markwardt <craigmnet(at)cow.physics.wisc.edu>*Date*: 04 Apr 2001 16:47:56 -0500*Newsgroups*: comp.lang.idl-pvwave*Organization*: U. Wisc. Madison Physics -- Compact Objects*References*: <MPG.153532f5334705a5989dc6@news.frii.com>*Reply-To*: craigmnet(at)cow.physics.wisc.edu*Xref*: news.doit.wisc.edu comp.lang.idl-pvwave:24354

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 --------------------------------------------------------------------------

**Follow-Ups**:**Re: IDLanROI Confusion***From:*Mark Hadfield

**Re: IDLanROI Confusion***From:*David Fanning

**References**:**IDLanROI Confusion***From:*David Fanning

- Prev by Date:
**Re: Congrid but with shift of origin** - Next by Date:
**Re: Object epiphany: A new way of building widget applications** - Prev by thread:
**IDLanROI Confusion** - Next by thread:
**Re: IDLanROI Confusion** - Index(es):