3

Problem: I have ring-like binary images with varying thicknesses. I want to calculate its thickness at n places of that ring-like segment.

My approach: Find the medial axis and distance transform. The distance transform maximizes at the medial axis, so I can use those distances and explain the thicknesses as distance*2.

Challenge: Since the images are a bit complex, when I use skimage.morphology.medial_axis to calculate the medial axis and distance transform, the medial axis branches at some points, which I do not want. I want a single ring-like medial axis without any branching. This messes up the distance transform results as well.

Medial axis

What I tried: I used NetworkX and refined the medial axis. Refined medial axis

Now my questions: To answer my initial problem, how to calculate the distance from the medial axis to the 2 boundaries at equidistant n points on the medial axis?.

N points on medial axis

Also is there any better way of answering my initial question?

I am using Python 3.9

Thank you in advance.

Savindi
  • 123
  • 1
  • 8
  • 1
    You can compute the distance transform of the medial axis. –  Sep 21 '22 at 07:03
  • @YvesDaoust I didn't find a way to do it. If you know, please let me know – Savindi Sep 22 '22 at 02:40
  • But you could compute the distance transform of the original shape ! –  Sep 22 '22 at 07:09
  • @YvesDaoust No. The previous distance function's peaks are including the branching. – Savindi Sep 22 '22 at 21:49
  • You don't get it, you are able to compute a distance map, right ? –  Sep 23 '22 at 07:55
  • I can't compute the distance map using the medial axis I have, if you know a way, please suggest. – Savindi Sep 27 '22 at 00:40
  • The same way that you used. –  Sep 27 '22 at 07:30
  • But there is unwanted branching. As you can see in the above image. If I take the point where branching happens, the distance from there to left and the right boundary is not equal. So if I double the distance at that point, it is not accurately giving me the thickness – Savindi Sep 27 '22 at 22:41
  • I said distance from the medial axis, didn't I ? –  Sep 28 '22 at 07:57

0 Answers0