Home > Blockchain >  How to find max value between boundary in segmentation?
How to find max value between boundary in segmentation?

Time:04-15

here's an issue: I want to find actual maximum width of boundary in segmented image with irregular shape (enter image description here

enter image description here

After I find x and y of points I will be able to calculate euclidean distance between 2 points

dist=sqrt((y2-y1)^2 (x2-x1)^2)

Please look at my code in colab notebook:

CodePudding user response:

From the pixel with the largest distance, you can explore concentric square layers, until you find a background pixel. Then find the background pixel with the shortest Euclidean distance on the last layer. The second endpoint is symmetrical.

  • Related