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 #61951] Tue, 12 August 2008 11:53 Go to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
mzagursk@gmail.com wrote:
> Hi All,
>
> 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?
>
> Hope I explained well enough!

Hi,

several ideas come to mind...
1) use label_region
2) use search_2D ,starting with points of value 2. Then break the
indices at the location of the points of value 2.
3) depending on the size of your image, find the relative coordinates of
the cells in the Moore neighborhood of cells 0;0 (that is, neighb =
central cell idx - sizeX -1 ; central idx - sizeX, central idx - sizeX +
1; central idx -1; central idx +1 etc). Then, on your own, start
(repetitively), from each point of value 2 and look for adjacent cells
of value 3.

Jean
[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 15:30:49 PDT 2025

Total time taken to generate the page: 0.48279 seconds