I don't understand what actualy MaxPerimeterDistance in ComponentMeasurements measures.

For example: 62x16 (white area) enter image description here returns 1, but for 34x32 (minimal bounding box around white area) enter image description here returns 13.8924

  • 1
    $\begingroup$ This appears to be a bug - the result for the first image is incorrect. Try using SetOptions[DistanceTransform, Padding -> 0] and recompute. $\endgroup$ Jul 8, 2016 at 13:11
  • $\begingroup$ Tank you very much. You are right. Now returns 8. . $\endgroup$
    – Dragutin
    Jul 8, 2016 at 13:55

1 Answer 1


following worked for me:

ComponentMeasurements[, CornerNeighbors->False]

whereas this did not help:

SetOptions[DistanceTransform, Padding -> 0]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.