It works like this:
- For each boundary point of the compare image, find the closest boundary point on the reference image. Then take the average of these distances.
- For each boundary point of the reference image, find the closest boundary point on the compare image. Then take the average of these distances.
- Take the average of the numbers computed in step 1 and step 2.