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

Home » Public Forums » archive » Re: 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
Re: Area of a Blob [message #33207 is a reply to message #33200] Thu, 12 December 2002 01:11 Go to previous message
Karsten Rodenacker is currently offline  Karsten Rodenacker
Messages: 98
Registered: July 1997
Member
This reminds me on a thread
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&a mp;oe=UTF-8&threadm=3BA05C3A.78C09388%40Rodenacker.de&am p;rnum=1&prev=/groups%3Fq%3Dgroup:comp.lang.idl-pvwave%2 BROI%2BRodenacker%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF- 8%26selm%3D3BA05C3A.78C09388%2540Rodenacker.de%26rnum%3D1
moving around just this topic!

Are you changing from pragmatics to progressives, David?

----------------
At least we have learned in the meantime that either the question is
ill-posed or some answers do not hit the question.

What is the area of a blob on an IMAGE?
If IMAGE is considerd as a digital image the area can only be an
integer, the number of pixels of the blob region, multiplied by the area
of one pixel. -> simple count

If the blob is defined by the contour coordinates located at the
CENTER of the pixels AND area is calculated based on integration formula
as done in POLY_AREA (Russ method), the result will be at least for
convex blobs smaller than the simple count. Area is defined by some sort
of rubberband (geodesy) around the pixel CENTERS.

If the blob is defined by the coordinates at the outsides of the
pixels (more than one coordinate pair possible and necessary for one
pixel) the POLY_AREA joines simple count. However it is relatively
complicated to calculate these coordinates. Area is defined by some sort
of rubberband (geodesy) around the pixel EDGES.

The definition of coordinate locations of course tackles the problem of
defining the coordinate system of the data (image). The pixel (0,0) has
coordinates (0.5,0.5) or (0.0,0.0) or (0.0,1.0) or (1.0,0.0)?

Area by simple count applied on POLYFILLV result, which returns
usually not the the generating blob pixel region, will again differ from
all.

AND as already stated in the mentioned thread the object graphics
methods differ again.

-----------
My wish is that at least in IDL the methods would be consistent, e.g.
POLYFILLV and IDLgrROI Mask Method as well as POLY_AREA and IDLgrROI
computeGeometry.

What to resume?

Discrete pixelized data input can only result in multiples of pixel
areas.

Mixing data representations are dangerous. My remedy is as recommeded
by David in the mentioned thread to stay in one methodical system, e.g.:
coordinates from CONTOUR,...,/PATH_DATA_COOR,/CLOSED
indices from POLYFILLV

It is necessary to define beforhand what is meant with data input
(float coordinates, pixels) and area. Everything said is also true for
perimeter.

There is not only one truth.

Thank you David to come up with this topic.

Best regards,
Karsten

David Fanning schrieb:
> 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
>


--
Karsten Rodenacker (LapTop)
------------------------------------------------------------ -------------:-)
GSF - Forschungszentrum Institute of Biomathematics and Biometry
D-85758 Oberschleissheim Postfach 11 29
Tel: +49 89 31873401 | FAX: ...3369 | rodena@gsf.de |
Karsten@Rodenacker.de
http://www.gsf.de/ibb/homepages/rodenacker
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: 5.6 goodies, R.I.P. REDUCE
Next Topic: Re: The IDL Book Bidness

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

Current Time: Sun Oct 12 09:39:48 PDT 2025

Total time taken to generate the page: 2.40124 seconds