1
$\begingroup$

I'm interested in calculating the Hausdorff Distance between 2 polygons (specifically quadrilaterals which are almost rectangles) defined by their vertices. They may overlap.

Recall $d_H(A,B) = \max(d(A,B), d(B,A))$ where $d$ is the Hausdorff semi-metric $d(A,B) = \sup_{a\in A}\inf_{b\in B}d(a,b)$.

Is it true that, given a finite disjoint covering of $A$, $\{A_i\}$, $d(A,B)=\max\{d(A_i,B)\}$? A corollary of which is that $d(A,B)=d(A\setminus B,B)$.

I have found a paper by Atallah 1 (PDF). I'm interested in working in Python and would be open to any preprogrammed solutions.

  • 0
    Are you looking for a Python library which implements this algorithm, or do you want to write it yourself? Either way, consider posting in stackoverflow.com2012-06-08
  • 0
    I've posted to SO - someone suggested posting it here, though I already had!2012-06-08
  • 0
    The problem might be that you have two questions here - one about theory and one about its application. Regardless, could you clarify what you are looking for?2012-06-08
  • 0
    I have an algorithm outputting a few almost rectangles, many of which are nearly the same - the vertices are +-5 pixels. I wish to cluster these similar rectangles and thought Hausdorff Distance is the best way to do it.2012-06-08

1 Answers 1