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

Home » Public Forums » archive » Re: Inverse of POLYFILLV
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: Inverse of POLYFILLV [message #7400] Wed, 13 November 1996 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Larry Busse writes <ljb@shell.one.net> writes:

> I'm a newbie to IDL and am trying to implement some Region Of Interest (ROI)
> tools for image processing.
>
> I'm using DEFROI to generate the list of pixels in the ROI. I'm then
> modifying the list to include pixels which are close to the average pixel
> intensity. Given this modified list of pixels, I'd like to generate the
> coordinates of the polygon which bounds this region. I'm asking to do
> something which is the inverse of POLYFILLV.
>
> Some sort of "hulling" algorithm
> comes to mind.

You can use the IDL TRIANGULATE procedure to return the indices on the
points of the convex hull that surrounds a set of points. For example,
like this:

x = RANDOMU(seed, 100) * 5 + 2.5
y = RANDOMU(seed, 100) * 5 + 2.5

TRIANGULATE, x, y, triangles, hullPoints
PLOT, x, y, PSYM=1, XRANGE=[0,10], YRANGE=[0,10]
hullPoints = [hullPoints, hullPoints(0)]
PLOTS, x(hullPoints), y(hullPoints)

I learned this from David Stern himself! :-)

David

*************************************************
* David Fanning, Ph.D.
* 2642 Bradbury Court, Fort Collins, CO 80521
* Phone: 970-221-0438 Fax: 970-221-4762
* E-Mail: davidf@dfanning.com
*
* Sometimes I go about pitying myself, and all along my
* soul is being blown by great winds across the sky.
* -- Ojibway saying
************************************************
Re: Inverse of POLYFILLV [message #7402 is a reply to message #7400] Wed, 13 November 1996 00:00 Go to previous message
hamill is currently offline  hamill
Messages: 4
Registered: April 1996
Junior Member
In article <56d78n$jog@news.one.net>, ljb@shell.one.net (Lawerence J.
Busse) wrote:

>
> I'm using DEFROI to generate the list of pixels in the ROI. I'm then
> modifying the list to include pixels which are close to the average pixel
> intensity. Given this modified list of pixels, I'd like to generate the
> coordinates of the polygon which bounds this region. I'm asking to do
> something which is the inverse of POLYFILLV.


The DILATE and ERODE operators are useful in this kind of application.
Good luck.

--
| Jim Hamill -- hamill@ais.net (home)
| or hamill@mailhub.nmg.sms.siemens.com (business)
|
| With interests in image processing, mathematics, physics,
| and especially nuclear medicine. And other stuff too.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: using of EXECUTE???
Next Topic: Re: min/max routines

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

Current Time: Wed Oct 08 11:51:26 PDT 2025

Total time taken to generate the page: 0.00928 seconds