
An affine space of dimension consists of a set of points and an associated vector space of dimension . It supports two operations:
- Point subtraction: (gives a vector)
- Point translation: (moves a point by a vector)
- Represent points at infinity (when ), as required for parallel lines in perspective projections.
- Express transformations such as perspective camera models and 3D projections as linear matrix operations.
Transformations in homogeneous coordinates
This section gives homogeneous matrix representations for common 2D transformations.Rigid transformation
A rigid transformation consists of a rotation and a translation. It preserves lengths and angles and does not include scaling or shearing. Its matrix is:- : rotation angle
- : translation
Similarity transformation
A similarity transformation includes rotation, translation, and uniform scaling. It preserves shape but not necessarily size. Here, is the scaling factor.Affine transformation
An affine transformation can combine translation, rotation, scaling, and shearing. It preserves parallel lines, but it need not preserve lengths or angles. This is the general form of a 2D affine transformation.Example
The following code applies these transformations to a square:
References
- Bronstein, M., Bruna, J., LeCun, Y., Szlam, A., Vandergheynst, P. (2016). Geometric deep learning: going beyond Euclidean data.
- Chang, A., Dai, A., Funkhouser, T., Halber, M., Nießner, M., et al. (2017). Matterport3D: Learning from RGB-D Data in Indoor Environments.
- Mur-Artal, R., Tardos, J. (2016). ORB-SLAM2: an Open-Source SLAM System for Monocular, Stereo and RGB-D Cameras.
- Qi, C., Su, H., Mo, K., Guibas, L. (2016). PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation.
- Zeng, A., Song, S., Nießner, M., Fisher, M., Xiao, J., et al. (2016). 3DMatch: Learning Local Geometric Descriptors from RGB-D Reconstructions.

