for a small project I need to compute the similarity transformation matrix which transforms 2d coordinates from one image (left image) in another image (right image). I know that the right image is generated from the left image by applying a similarity transformation (rotation, translation). Further I know that the following relation between a point from the left image (u,v) and a point from the right image (u',v') (a match) holds:

$$ \begin{align} \begin{bmatrix} u' \\ v' \end{bmatrix} = \begin{bmatrix} a & -b & c \\ b & a & d \end{bmatrix} \cdot \begin{bmatrix} u \\ v \\ 1 \end{bmatrix} \end{align} $$

We have now 4 unknowns => we need to collect 4 points (2 matches) and get the following equations: $$ u_0' = au_0 - bv_0 + c\\ v_0' = bu_0 + av_0 + d\\ u_1' = au_1 - bv_1 + c\\ v_1' = bu_1 + av_1 + d $$

My question is now how to bring this in a form where the SVD can be applied to find the best similarity matrix.

Thank you!

edit Attention: The matches might be noisy - in other words, not all matches follow exactly the same transformation.

  • $\begingroup$ You have a system of linear equations in the entries of the transformation matrix. Rewrite that system in matrix form, effectively “flattening” the transformation matrix into a vector. $\endgroup$
    – amd
    Oct 25, 2017 at 0:09

1 Answer 1


The system of equations is already in matrix form ($4\times4$).

There is no benefit using an SVD, Gaussian elimination is good enough, as the solution is exact.

  • 1
    $\begingroup$ I think that the solution will not be perfect, since the matches are noisy. I would assume that a optimization is necessary. Therefore a SVD might be a possibility. $\endgroup$
    – bobby
    Oct 24, 2017 at 23:24
  • $\begingroup$ @bobby: you said you were using two pairs of points. If true, SVD is pointless. In any case, this system is already in matrix form. $\endgroup$
    – user65203
    Oct 25, 2017 at 6:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .