# Computer Vision and Similarity Transform between two images

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.

• 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.
– amd
Oct 25, 2017 at 0:09

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