Hausdorff distance for shape matching