Previous | Next --- Slide 20 of 41
Back to Lecture Thumbnails silentQ

I understand what affine means, but why is it an important class of transformations? What does a transformation being affine mean about what we can do with it? kc1

@silentQ Professor Crane may have more insight, but recognizing a 2D shape has been transformed via affine warp tells us that it has some combination of scale, rotation, reflection, and/or shear transformation applied to it, plus translation. Being able to recognize a transformation and its form can help us "rectify" it if need be. This is of particular interest in image processing. That is, given an image that has been "warped", we can find an inverse mapping to un-distort it. A general transformation in 2D projective geometry is a 3 by 3 matrix, which has 9 unknowns (but 8 degrees of freedom, because we cannot solve for scale!). An affine transformation has 6 degrees of freedom, meaning we only need 6 equations to solve. If we naively assumed a general transform, we would need 8 equations. Just by recognizing the type of transform, we reduced the number of equations and the time complexity to solve (this may not seem like a big deal, but if we have to do this thousands of times using RANSAC to find the "inliers", it's a huge deal). The last page of the following link has a good summary slide for general 2D transformations: http://robotics.itee.uq.edu.au/~metr4202/2012/T2-Homogenous Transforms.pdf . Hope this helped! keenan

@silentQ Mostly I introduce the word "affine" in this context to make a clear distinction between affine and linear. Otherwise I'd be saying "linear" and "not linear" all the time, but there are way more things that are not linear. ;-)

Another way to look at the distinction between affine and linear is that

• linear maps preserve linear combinations of vectors
• affine maps preserve convex combinations of vectors

More precisely, an affine map $f: \mathbb{R}^n \to \mathbb{R}^m$ is any function of the form $f(\mathbf{x}) = \mathbf{b} + g(\mathbf{x})$ for some linear map $g: \mathbb{R}^n \to \mathbb{R}^m$ and vector $\mathbf{b} \in \mathbb{R}^m$. Let $\mathbf{p}_1, \ldots, \mathbf{p}_k$ be a collection of points in $\mathbb{R}^n$, and let

$$\mathbf{q} := \sum_{i=1}^k w_i \mathbf{p}_i,$$

where $w_1, \ldots, w_k \in \mathbb{R}$ are a set of weights such that

$$\sum_{i=1}^k w_i = 1.$$

Then $\mathbf{q}$ is called a \emph{convex combination} of the points $\mathbf{p}_i$.

Claim. Affine maps preserve convex combinations.

Proof. We have

$f(\mathbf{q}) =$

$\mathbf{b} + g(\sum_{i=1}^k w_i \mathbf{p}_i) =$

$\mathbf{b} + \sum_{i=1}^k w_i g(\mathbf{p}_i),$

and also,

$\sum_{i=1}^k w_i f(\mathbf{p}_i) =$

$\sum_{i=1}^k w_i( \mathbf{b}_i + g(\mathbf{p}_i)) =$

$\mathbf{b} \sum_{i=1}^k w_i + \sum_{i=1}^k w_i g(\mathbf{p}_i) =$

$\mathbf{b} + \sum_{i=1}^k w_i g(\mathbf{p}_i).$

One thing we discussed in class is that affine maps in $\mathbb{R}^n$ can be expressed as linear maps in $\mathbb{R}^{n+1}$, using homogeneous coordinates. Can you relate this observation to the observation about linear vs. convex functions above?