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

Home » Public Forums » archive » Re: Need Some Good Ideas
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Need Some Good Ideas [message #29434 is a reply to message #29429] Thu, 21 February 2002 08:09 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ronn Kling (ronn@rlkling.com) writes:

> After you draw the contours around your blobs then create a blank pixmap of
> the same size as the image. (I am guessing that you are using device
> coordinates) Then draw the contour to the pixmap in a single color like 255.
> Do an im= TVRD() to get a new image and then do an indices = where( im eq
> 255). Turn these back to x,y coords and you have a very nearly evenly
> spaced series of points.

I've used this method before, and it might actually
work in this instance too, although it seems such
a hack I'm always embarrassed to have it in my
"professional" code. :-)

One of the problems with it, incidentally, is
that the points returned by the WHERE function
are not in the order you expect them to be in.
That is to say, the WHERE function doesn't find
one end of the line and proceed to the other end.
It can jump around, depending (I suppose) on how
the line is oriented on the image. We learned this
to our dismay when we were using this method to
calculate the length of line segments. We had
to add a routine to sort the WHERE indices into
a real line!

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: OT - Programmer war stories
Next Topic: Euler formula with complex numbers

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

Current Time: Sat Oct 11 12:18:55 PDT 2025

Total time taken to generate the page: 0.95402 seconds