When we detect a feature (like a corner or keypoint) in image 1, we want to find the same feature in image 2.

To do this, we compare patches (small windows of pixels) around the feature in the two images. To do this, we use similarity metrics.

Sum of Absolute Differences (SAD):

  • Take a small window centered at (u,v) in Image 1.
  • Take another window centered at (u’,v’) in Image 2.
  • For each corresponding pixel in the two windows, compute the absolute difference
  • Sum all those differences

Sum of Squared Differences (SSD):

  • Same ideas as SAD, but we square the differences. This means that large differences are penalized more heavily, and smooths out