Re: measuring areas [message #12281] |
Wed, 15 July 1998 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
meir_s@my-dejanews.com (meir_s@my-dejanews.com) writes:
> Does anyone have a working (?widget based) program for tracing with a cursor
> the outline of an area and measuring the area with IDL? (I thought I had
> one, but can't find it., and couldn't find it such cursor tracing in the
> manual) The image quality is such that automatic edge detection is
> problematic.
>
> Thanks for any help or pointers.
This could be cobbled together in less than half an hour, I
expect, with code found on my web page. For example, to
see how to draw a free-hand line in a widget program you
could look at this IDL Programming Tip:
http://www.dfanning.com/tips/line_on_image.html
Using the program DrawLine found there, I would modify it
so that the RIGHT mouse button closed the polygon drawn with
the LEFT mouse button. You could use PolyFillV to learn the
indices of all the pixels enclosed by the polygon. Dividing
by the total number of pixels in the image would give
you the percent area of the total image.
If you have difficulty, let Dick or me know. We would
be glad to program it up for you and probably throw in
the "coyote" newsgroup discount to boot. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|