https://georgepavlides.info/how-to-detect-the-maximum-pixel-distance-in-a-binary-image/
How to detect the maximum pixel distance in a binary image