“名场面”如下图:2D 平面基本变换
x ′ = x + t x x^{'} = x+t_{x} x′=x+tx x ′ = x + t y x^{'} = x+t_{y} x′=x+ty 矩阵形式: [ x ′ y ′ 1 ] = [ 1 0 t x 0 1 t y 0 0 1 ] [ x y 1 ] \left[ \begin{matrix} x^{'} \\ y^{'} \\ 1 \end{matrix} \right] = \left[ \begin{matrix} 1 & 0 & t_x \\ 0 & 1 & t_y \\ 0 & 0 & 1 \end{matrix} \right] \left[ \begin{matrix} x \\ y \\ 1 \end{matrix} \right] ⎣⎡x′y′1⎦⎤=⎣⎡100010txty1⎦⎤⎣⎡xy1⎦⎤
x ′ = x c o s θ − y s i n θ + t x x^{'}=x cos\theta-ysin\theta+t_x x′=xcosθ−ysinθ+tx y ′ = x c o s θ + y s i n θ + t y y^{'}=x cos\theta+ysin\theta+t_y y′=xcosθ+ysinθ+ty 矩阵形式: [ x ′ y ′ 1 ] = [ c o s θ − s i n θ t x s i n θ c o s θ t y 0 0 1 ] [ x y 1 ] \left[ \begin{matrix} x^{'} \\ y^{'} \\ 1 \end{matrix} \right] = \left[ \begin{matrix} cos\theta & -sin\theta & t_x\\ sin\theta & cos\theta & t_y \\ 0 & 0 & 1 \end{matrix} \right] \left[ \begin{matrix} x \\ y \\ 1 \end{matrix} \right] ⎣⎡x′y′1⎦⎤=⎣⎡cosθsinθ0−sinθcosθ0txty1⎦⎤⎣⎡xy1⎦⎤ 进一步可表示为: [ P ′ 1 ] = [ R t 0 T 1 ] = [ P 1 ] \left[ \begin{matrix} P^{'} \\ 1 \end{matrix} \right ] = \left[ \begin{matrix} R & t \\ 0^T & 1 \end{matrix} \right ] = \left[ \begin{matrix} P \\ 1 \end{matrix} \right ] [P′1]=[R0Tt1]=[P1] 由上式子可得,改变换共有3个自由度
x ′ = s x c o s θ − s y s i n θ + t x x^{'}=sx cos\theta-sysin\theta+t_x x′=sxcosθ−sysinθ+tx y ′ = s x c o s θ + s y s i n θ + t y y^{'}=sx cos\theta+sysin\theta+t_y y′=sxcosθ+sysinθ+ty 矩阵形式: [ P ′ 1 ] = [ s R t 0 T 1 ] = [ P 1 ] \left[ \begin{matrix} P^{'} \\ 1 \end{matrix} \right ] = \left[ \begin{matrix} sR & t \\ 0^T & 1 \end{matrix} \right ] = \left[ \begin{matrix} P \\ 1 \end{matrix} \right ] [P′1]=[sR0Tt1]=[P1] 相似变换保持夹角不变 改变换共有,4个自由度
基本性质保持不变:
共线性平行性共线比例不变性凸性 矩阵形式: [ x ′ y ′ 1 ] = [ a 1 a 2 t x a 3 a 4 t y 0 0 1 ] [ x y 1 ] \left[ \begin{matrix} x^{'} \\ y^{'} \\ 1 \end{matrix} \right] = \left[ \begin{matrix} a_1 & a_2 & t_x\\ a_3 & a_4 & t_y \\ 0 & 0 & 1 \end{matrix} \right] \left[ \begin{matrix} x \\ y \\ 1 \end{matrix} \right] ⎣⎡x′y′1⎦⎤=⎣⎡a1a30a2a40txty1⎦⎤⎣⎡xy1⎦⎤ 共有6个自由度8个自由度,保持共线性 [ x ′ y ′ w ] = [ h 00 h 01 h 02 h 10 h 11 h 12 h 20 h 21 1 ] [ x y 1 ] \left[ \begin{matrix} x^{'} \\ y^{'} \\ w \end{matrix} \right] = \left[ \begin{matrix} h_{00} & h_{01} & h_{02}\\ h_{10} & h_{11} & h_{12} \\ h_{20} & h_{21} & 1 \end{matrix} \right] \left[ \begin{matrix} x \\ y \\ 1 \end{matrix} \right] ⎣⎡x′y′w⎦⎤=⎣⎡h00h10h20h01h11h21h02h121⎦⎤⎣⎡xy1⎦⎤ x ′ = x ′ w x^{'} =\frac{x^{'}}{w} x′=wx′ y ′ = y ′ w y^{'} =\frac{y^{'}}{w} y′=wy′
变换矩阵自由度不变性平移[I | t]2方向刚性[R | t]3长度相似[sR | t]4夹角仿射[A]6平行性投影[H]8直线型