Hello,

It maybe a trivial question but I was wondering what the least computational intensive method is to get the image coordinates of junction pixel of a 2D topological skeleton? The "analyse skeleton" procedures are very good but I want to stay Independent from any plugin. So, let's say I have the skeleton in a binary Image where the background is 0 and the skeleton pixels have the values 1. Junction pixels are defined as skeleton pixels with more than 2 (8-connected) neighboring skeleton pixels.

My first approach was to run a loop through all pixels with value 1 and then count their neighboring skeleton pixels - this was surprisingly slow and I was thinking of another way to do this.

My second approach almost works :-) and is faster but is certainly a hack and I can't rely on it. The idea is that I convert the image into 8-bit and if I blur the Image by taking the mean of the 3x3 neighborhood, then the effect of neighboring skeleton pixels would make the junction pixels become darker than the rest. Then I could find least intense pixels under a suitable threshold. But due to different concerns I think this method is not appropriate, or is it? The intensities of course vary from when all neighboring pixels are 4-connected to when all neighbors are edge pixels so i should have the intensity of each pixel being the sum of skeleton pixels within the distance [0,sqrt(2)] divided by 9 times 2^8. Does it make any sense?

Do you have any alternative approaches?

More Martin Jakob's questions See All
Similar questions and discussions