Minimum distance between two Irregular forms

1 view (last 30 days)
WHAT is the min distance between these two shapes?
note: i know the connecting points of big figure.
didnot.jpg

Accepted Answer

Image Analyst
Image Analyst on 31 Mar 2019
Edited: Image Analyst on 1 Apr 2019
If you have the stats toolbox, try this:
distances = pdist2(xyShape1, xyShape2)
minDistance = min(distances(:))
[minRows, minColumns] = find(distances == minDistance)
  18 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by