title: Finding correspondence of edges for image matching
body: <p>I have a challenging problem to solve. The <a href="https://i.stack.imgur.com/DCWN6.png" rel="nofollow noreferrer">Figure</a> shows green lines, that are derived from an image and the red lines are the edges derived from another image. Both the images are taken from the same camera, so the intrinsic parameters are same. Only, the exterior parameters are different, i.e. there is a slight rotation and translation while taking the 2nd image. As it can be seen in the figure, the two sets of lines are pretty close. My task is to find correspondence between the edges derived from the 1st image and the edges derived from the second image. </p>
  
  <p>I have gone through a few sources, that mention taking corresponding the nearest line segment, by calculating Euclidean distances between the endpoints of an edge of image 1 to the edges of image 2. However, this method is not acceptable for my case, as there are edges in image 1, near to other edges in image 2 that are not corresponding, and this will lead to a huge number of mismatches. </p>
  
  <p>After a bit of more research, few more sources referred to <strong>Hausdorff distance</strong>. I believe that this could really be a solution to my problem and the paper </p>
  
  <blockquote>
    <p>"Rucklidge, William J. "Efficiently locating objects using the
    Hausdorff distance." International Journal of Computer Vision 24.3
    (1997): 251-270."</p>
  </blockquote>
  
  <p>seemed to be really interesting.</p>
  
  <p>If, I got it correct the paper formulated a function for calculating translation of model edges to image edges. However, while implementation in MATLAB, I'm completely lost, where to begin. I will be much obliged if I can be directed to a pseudocode of the same algorithm or MATLAB implementation of the same. </p>
  
  <p>Additionally, I am aware of</p>
  
  <blockquote>
    <p>"Apply Hausdorff distance to tile image classification" <a href="https://au.mathworks.com/matlabcentral/fileexchange/34531-apply-hausdorf-distance-to-tile-image-classification" rel="nofollow noreferrer">link</a></p>
  </blockquote>
  
  <p>and</p>
  
  <blockquote>
    <p>"Hausdorff regression" </p>
  </blockquote>
  
  <p>However, still, I'm unsure how to minimise Hausdorff distance. </p>
  
  <p>Note1: Computational cost is not of concern now, but faster algorithm is preferred </p>
  
  <p>Note2: I am open to other algorithms and methods to solve this as long as there is a pseudocode available or an open implementation. </p>