3

Some context (original question below): I wanted to know if there's a nice concise formula to calculate the transformation based on a list of points and another list of the transformed points. This is all 2D or $\mathbb{R}^2$.

By that I mean some matrix equation that has a matrix that contains the given values, so that one can invert this matrix to solve for the transformation matrix or its components.

The question I link to below has the very same goal and especially a nice answer that I was looking for, but it does not create a linear or affine transform.


In his answer to this question bubba makes the following statement:

The transformation can not be linear or affine, it has to be a "perspective" transform.

Why is that? What if I want to find the affine or linear transformation and not the perspective/nonlinear one?

I'm not sure about this, but I guess that if $c_0 = 0$ and $c_1 = 0$, then the perspective transformation will be linear. Would that help me to find the linear or affine transform of points?

null
  • 1,540
  • It might be good to edit in more of the context so that your question does not depend on those links never breaking. – Mark S. Jun 05 '15 at 13:13

1 Answers1

1

Algebraically: to map to four 2D points you need to ensure eight numbers are correct (you have eight equations, basically). But an affine 2D transformation is defined by a 2x2 matrix with four entries and two more numbers for the translation. Eight equations in six variables usually can't be solved.

Geometrically: A linear transformation is a combination of shears, dilations, and rotations. An affine transformation can use translations as well. In particular, a parallelogram like the initial four points were must stay a parallelogram after an affine transformation. (See this math insight page for more) So an affine transformation can't give the desired four output points.

Mark S.
  • 25,893
  • So this is all about the given number of points. If one would assume all 4 points are transformed by the same affine transform, one could take the first 3 of them to build 6 equations for the 6 unknowns, right? – null Jun 05 '15 at 14:12
  • @null Absolutely right. As long as the three initial points don't lie on the same straight line, you will be able to solve the 6 equations for the 6 unknowns. – Mark S. Jun 05 '15 at 14:26