Created
December 10, 2021 09:15
-
-
Save AxoyTO/82a85e59742417466c27bbd0493031d6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def hausdorff(model_1_vertices, model_2_vertices): | |
| model_1_vertices = np.array(model_1_vertices[:-1]).reshape(-1, 1) | |
| model_2_vertices = np.array(model_2_vertices[:-1]).reshape(-1, 1) | |
| dist = cdist(model_1_points, model_2_points) | |
| hausdorff_dist = max(dist.min(axis=0).max(), dist.min(axis=1).max()) | |
| return hausdorff_dist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment