Re: Important! Regarding Objects [message #41350] |
Wed, 27 October 2004 01:33  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Pravesh writes:
> Thanks for that response, david.
> Though i have a feeling that find_boundary will not work for regions
> with holes.
No, for that you would need something like CONTOUR,
or ISOCONTOUR, if you can figure out how it works, I
can't.
> Can u tell me how to go about using objects! keeping in mind the
> scenario i put in front of u in the last mail!
> using objects seems much simpler. please tell me asap.
When I work with blobs (the technical term for these
kind of things, after an hour or so they become known
as the damn blobs, but that's another story) I usually
put them in a fresh 2D array of the same size of the
image. Set all the pixel values to 255. Then I contour
the thing with a value of, say, 128. I use PATH_INFO
and PATH_XY to get the contours. I pull each contour
out (holes, etc., too) and use these as input to an
IDLanROI object. I use the various methods of the
object (ComputeGeometry, etc.) to gather the information
I need.
But, this *never* goes smoothly. There are *always*
problems, sometimes lots of them. You have to be agile
and nimble on your feet. It can be done, but probably
not under the time pressure you are apparently feeling.
At least *I* wouldn't be able to do it under pressure.
It requires too much concentration.
Just remember Erosion and Dilation are your friends. :-)
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
|
|
|