Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
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 ************************************************
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.