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

Home » Public Forums » archive » Re: perimeter of a blob
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: perimeter of a blob [message #18628] Wed, 26 January 2000 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Kenneth P. Bowman (bowman@null.tamu.edu) writes:

> I think that TRIANGULATE returns the convex hull of a set of points. If
> the boundary of the region is concave, the perimeter is different from the
> perimeter of the convex hull.

Ah, yes. Now I remember why I haven't yet written that
article. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: perimeter of a blob [message #18629 is a reply to message #18628] Wed, 26 January 2000 00:00 Go to previous message
bowman is currently offline  bowman
Messages: 121
Registered: September 1991
Senior Member
In article <MPG.12f91c174956d2d89899fc@news.frii.com>, davidf@dfanning.com
(David Fanning) wrote:

> Anyway, the easiest way to get a perimeter, I think is to
> use the Triangulate function.
>
> Cheers,

I think that TRIANGULATE returns the convex hull of a set of points. If
the boundary of the region is concave, the perimeter is different from the
perimeter of the convex hull.

Ken Bowman
Re: perimeter of a blob [message #18630 is a reply to message #18628] Wed, 26 January 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Ben Tupper (tupper@seadas.bigelow.org) writes:

> I am looking for an efficient means of finding the perimeter of
> contiguous blobs of pixels within an image. These blobs are the
> regions returned by the LABEL_REGION function. I have been using the
> trusty brute-force-and-ignorance appraoch where I scan rows and columns
> within each blob, recording the min and max coordinates of each
> row/column. It is a cumbersome task and leaves gaps in certain areas
> (especially concavities in the blob.)

I don't know why I haven't written an article about this,
since this is about the 10th time I've needed to look this
up, but maybe I will. :-)

Anyway, the easiest way to get a perimeter, I think is to
use the Triangulate function. An optional fourth positional
parameter returns the perimeter points. You will probably
have to figure out how to get the 2D indices from the
1D array of indices returned by Label_Region, but *that*
is on my web page for sure:

http://www.dfanning.com/tips/where_to_2d.html

IDL> Triangulate, xpts, ypts, tri, boundaryPts

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Fractal analysis in PV-WAVE, anyone?
Next Topic: Re: elliptic integrals

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

Current Time: Wed Oct 08 15:17:27 PDT 2025

Total time taken to generate the page: 0.02500 seconds