11-02-2016 01:55 PM
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.
What I need is the number of pixels or an other measurement for the length like here (cutting like the green lines)
It would be also a satisfying solution to cut of the shorter parts like this:
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.
11-03-2016 02:18 AM
Hi,
what kind of problems do you have? Can you post your VI you have so far?
Regards,
Christoph
11-03-2016 06:38 AM
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.
11-03-2016 10:47 AM
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
11-04-2016 03:30 AM
Thank you Kevin,
I will try to come up with an other approach, which is maybe using your suggested VI.
Regards, Dennis
11-04-2016 04:17 PM
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