A linear map plus a translation. It preserves straight lines, parallelism and ratios along a line, but not angles or distances. Translation, rotation, scaling and shear are particular cases.
Points are chosen with the mouse: for each pair, first the source (yellow) and then the destination (cyan). The result keeps the image size.
Parameters
| Parameter | Meaning |
|---|---|
| Interpolation | How values at non-integer positions are computed. |
| Empty areas | Value of pixels that fall outside the original image. |
See also: Interpolation and borders, Perspective transform (4 points)
References
- OpenCV 4.x documentation — Geometric Image Transformations (warpAffine, warpPerspective, getAffineTransform, getPerspectiveTransform, getRotationMatrix2D, interpolation flags). docs.opencv.org/4.x/da/d54/group__imgproc__transform.html
- R. Hartley, A. Zisserman. Multiple View Geometry in Computer Vision, 2nd ed. Cambridge University Press, 2004.
- R. Szeliski. Computer Vision: Algorithms and Applications, 2nd ed. Springer, 2022. szeliski.org/Book/