-->

Homography and Affine Transformation

2020-02-26 08:00发布

问题:

Hi i am a beginner in computer vision and i wish to know what exactly is the difference between a homography and affine tranformation, if you want to find the translation between two images which one would you use and why?. From papers and definitions I found online, I am yet to find the difference between them and where one is used instead of the other.

Thanks for your help.

回答1:

I have set it down in the terms of a layman.

Homography

A homography, is a matrix that maps a given set of points in one image to the corresponding set of points in another image.

The homography is a 3x3 matrix that maps each point of the first image to the corresponding point of the second image. See below where H is the homography matrix being computed for point x1, y1 and x2, y2

Consider the points of the images present below:

In the case above, there are 4 homography matrices generated.

Where is it used?

  1. You may want to align the above depicted images. You can do so by using the homography.

Here the second image is mapped with respect to the first

  1. Another application is Panoramic Stitching

Visit THIS BLOG for more

Affine transformation

An affine transform generates a matrix to transform the image with respect to the entire image. It does not consider certain points as in the case of homography.

Hence in affine transformation the parallelism of lines is always preserved (as mentioned by EdChum ).

Where is it used?

It is used in areas where you want to alter the entire image:

  • Rotation (self understood)
  • Translation (shifting the entire image by a certain length either to top/bottom or left/right)
  • Scaling (it is basically shrinking or blowing up an image)

See THIS PAGE for more



回答2:

A picture is worth a thousand words: