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

Home » Public Forums » archive » Re: Joining Multiple Vectors from the Thin Function
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: Joining Multiple Vectors from the Thin Function [message #61956 is a reply to message #61955] Tue, 12 August 2008 11:25 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
mzagursk@gmail.com writes:

> This problem is a bit complex so I'll try to spell it out as best I
> can. IDL's THIN() function finds the medial axis of a shape. In my
> case, this medial axis is akin to the ridge of a mountain. The output
> of the THIN function is an array of the same dimensions as the image
> with all values set to 0 except: If the point is on the medial axis,
> it has a value of '3'. If the point is on the medial axis and is an
> endpoint, it has a value of 2. I need to find a way to extract (in
> order) the ridge data. This task is further complicated because the
> THIN function does not output just one medial axis. Instead, it
> outputs 'segments' if there is a kink in the shape. So, you end up
> with a complex structure of line segments. What I need to do is put
> these segments in order from one endpoint to the other endpoint of the
> ridge. Any ideas?

Get a list of end points and make arrays to keep track of any
end points and ridge points you have already examined. Start with
any unexamined endpoint. Mark it as "examined". Look at its eight
neighbors for an unexamined ridge point. Mark this ridge point
as "examined". Keep doing this until you find another end point.
That's a segment.

Do this until you have no more unexamined end points.

Cheers,

David

P.S. Consider doing this in C. :-)

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Joining Multiple Vectors from the Thin Function
Next Topic: Thinning problems...

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

Current Time: Fri Oct 10 18:19:28 PDT 2025

Total time taken to generate the page: 1.99670 seconds