Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate longest path OR pruning skeltons

Hello,

 

I have problems calculating the longest path on an binary image calculated by IMAQ-Skeleton using the L-algorithm. 

An example is found here, where 2 skeletons are in one picture.

example_skeleton.PNG

What I need is the number of pixels or an other measurement for the length like here (cutting like the green lines)

solution_1.PNG

It would be also a satisfying solution to cut of the shorter parts like this:

solution_2.PNG

Is there a function helping me to cut of the smaller parts or some kind of "pathwalker"-function?

I tried and did not came up with a satisfying idea using only "binary picture to image".

 

Every help is much appreciated!

 

Thanks in Advance.

 

0 Kudos
Message 1 of 6
(4,304 Views)

Hi,

 

what kind of problems do you have? Can you post your VI you have so far?

 

Regards,

Christoph

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
0 Kudos
Message 2 of 6
(4,272 Views)

Actually I can't post one since I did not came up with a satisfying solution only using the binary image to array function.

What I'm looking for is a way to prune the skeletons, so there will be only one path per skeleton. Then I could do the programming myself.

There is a similar problem posted on the matlab forum:

https://de.mathworks.com/matlabcentral/answers/88284-remove-the-spurious-edge-of-skeleton

I want to do something like this, but with only the longest path remaining.

 

Any help would be much appreciated.

 

Thanks in Advance.

0 Kudos
Message 3 of 6
(4,261 Views)

If you are going to implement your own solution, this might be a useful head start:

http://forums.ni.com/t5/Machine-Vision/How-to-get-boundary-contour-points/m-p/578177#M14826

0 Kudos
Message 4 of 6
(4,247 Views)

Thank you Kevin,


I will try to come up with an other approach, which is maybe using your suggested VI.


Regards, Dennis

0 Kudos
Message 5 of 6
(4,213 Views)

Hi Dennis,

Probably not the most optimal method, but LabVIEW Robotics does come with an implementation of the A star path planning algorithm which you might be able to adapt to fit this application https://decibel.ni.com/content/docs/DOC-8983. Good luck with the algorithm!

Regards,

Joseph

 

0 Kudos
Message 6 of 6
(4,199 Views)