3
$\begingroup$

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?

$\endgroup$
1
  • $\begingroup$ It might be good to edit in more of the context so that your question does not depend on those links never breaking. $\endgroup$ – Mark S. Jun 5 '15 at 13:13
1
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ 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? $\endgroup$ – null Jun 5 '15 at 14:12
  • $\begingroup$ @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. $\endgroup$ – Mark S. Jun 5 '15 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.