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

Home » Public Forums » archive » Area of a Blob
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Area of a Blob [message #33213] Wed, 11 December 2002 10:40
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

Here is a question for you:

How much money did you make this year?

Oh, wait, sorry. That has the same answer, but
it's the wrong question. Here it is:

What is the area of a blob on an image?

The answer, of course, is that it depends on who
is asking.

Ben Tupper and I were musing about this question this
week, because it turns out you can get several answers,
depending upon how you calculate it.

Here are the results I got for a typical "blob" on
an image I am analyzing:

Area by .....
Simple Count: 7390.00
Russ Method: 7236.50
PolyfillV Method: 7313.00
IDLgrROI computeGeometry: 7236.50
IDLgrROI Mask Method: 7391.00

The Simple Count method just finds the unique indices in
the ROI. The Russ method and the PolyFillV method involve
calculating the chain code boundary of the ROI and using
that to count the area of the pixels inside the boundary.
The PolyFillV method misses most of the boundary pixels
on the upper-right of the ROI. The Russ algorithm is this:

area = sum( (x(I) + x(i-1)) * (y(I) - y(i-1)) ) / 2.

Where X and Y are the boundary points that close back on
themselves. (We use my FIND_BOUNDARY program to find the
boundary.)

The Compute Geometry and ROI Mask method are used in
IDL IDLgrROI object.

What do you make of this? Does anyone have any insight?
Does it matter how you computer area as long as you are
consistent? Or is one method more accurate than others?
What is the *real* answer?

Appreciate your thoughts. :-)

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Previous Topic: Cursor in the draw widget - please help
Next Topic: IDL QA Tester - Boulder, CO

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

Current Time: Sat Oct 11 03:05:51 PDT 2025

Total time taken to generate the page: 2.39855 seconds