From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Limitations of Skeleton L

Solved!
Go to solution

Hi,

 

I am stumbling upon limitations of the Skeleton function, and IMHO, they are regarding to feature size.

 

Let's assume I am workign with a big image.. 2048*something.
What I get from the Skeleton L function is this

skeleton_1_2400_1200.png

(I know, Skeleton lines are barely visible. What matters is the "block in the middle".. aka the Skeleton function is overflowing)

 

This is the same operation at 600*355px image size (which is NOT large IMHO)

 

skeleton_1_600-355.png

 

Only with an image size of 230x160 or so, I am starting to get a "real result"

 

skeletonl_230_138.PNG

I am not really happy about this behaviour and losing A LOT of detail here.


I have two suspicions:
a) Somewhere data is stored in an U8.. 
b) IMAQ Skeleton is most likely based on thinning skeletonization, which in turn is probably based on IMAQ Morphology. IMAQ Morphology starts being unreliable after a magic 100 iterations.. 

 

Can anyone from NI give more info? I will probably have to re-implement the entire thing.. but would at least like to know where / IF I can trust this algorithm to a certain particle size.


Thanks
B

0 Kudos
Message 1 of 9
(3,841 Views)
0 Kudos
Message 2 of 9
(3,818 Views)

Standard border size for IMAQ Images is 3 anyways.

 

But yes, I tried now (even with border size >>), and it doesn't help.

0 Kudos
Message 3 of 9
(3,811 Views)
could you send your original image to test?
0 Kudos
Message 4 of 9
(3,809 Views)

Was already attached to initial post.

0 Kudos
Message 5 of 9
(3,807 Views)

this is my answer
L shape algorithm for Ni do not regard your shape as a L shape based on number of shape pixels concentration in area 
so this algorithm is based on size and pixel amount for regarding the shape is L shape or not 
and in that size this algorithm do not regard your shape as a L shape 
I reshape a bit your shape for test this 
check bellow image and you will be see that in this shape this algorithm work better
also I think this is not good that this algorithm work based on number of shape pixels and it should work with percent of pixels for regarding  a shape is L shape or not 

0 Kudos
Message 6 of 9
(3,804 Views)

Skeletonization is not about shape recognition. It is about extracting topological information (symmetry, longest path etc) - see here https://en.wikipedia.org/wiki/Topological_skeleton. 


And the "L" signifies which structuring element NI chooses for thinning. Or multiple "conditional" thinning.

0 Kudos
Message 7 of 9
(3,796 Views)

my means is this that you can see in this image 
did you check L skeleton on image that I send for you 

0 Kudos
Message 8 of 9
(3,793 Views)
Solution
Accepted by topic author b.ploetzeneder

Just for anyone actually searching for the topic: I ended up implementing my own Skeleton algorithm. It works, it has no size limitations (beyond U16 distances :)) and is 84x (on my application) as fast than the NI one. 

 

https://decibel.ni.com/content/blogs/bp/2016/10/04/skeletons-in-ni-vision-or-lets-do-something-nicer

0 Kudos
Message 9 of 9
(3,765 Views)