Hello Hege,
I understand that you are trying to identify intersections in voxelated lines. Based on the provided image, it seems that there are 6 branch points, but when using the “bwmorph3” function to find branch points, you are getting 8 points.
This behaviour could be due to the binary skeleton not being minimally connected, resulting in additional intersections.
To address this, you can try applying thinning to remove unnecessary pixels using the "thin" argument of the “bwmorph()” function:
thin = bwmorph(B2, 'thin');
B3 = bwmorph3(thin, 'branchpoints');
By incorporating thinning, you may obtain a more accurate representation of the branch points.
You can refer to the below documentation to understand how “bwmorph” defines a branch point.
I hope this helps.