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 #61955 is a reply to message #61954] Tue, 12 August 2008 11:28 Go to previous messageGo to previous message
mzagursk@gmail.com is currently offline  mzagursk@gmail.com
Messages: 9
Registered: June 2008
Junior Member
On Aug 12, 11:25 am, David Fanning <n...@dfanning.com> wrote:
> mzagu...@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.")

Thanks for the reply. Making the segments shouldn't be a problem, my
problem is after I get these segments I need to create a "master"
array of all of the segments in order. Any ideas on that?
[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: Sat Oct 11 04:51:56 PDT 2025

Total time taken to generate the page: 1.84086 seconds