齐次坐标系下仿射变换矩阵分解为线性变换矩阵和平移变换矩阵

仿射变换=线性映射+平移,三维坐标系中表达为

\begin{bmatrix} {x}'\\ {y}'\\ {z}' \end{bmatrix} = \begin{bmatrix} a& b &c \\ d&e &f \\ g& h & i \end{bmatrix} \begin{bmatrix} x\\ y\\ z \end{bmatrix}+\begin{bmatrix} t_{x}\\ t_{y}\\ t_{z} \end{bmatrix}

在齐次坐标系下4×4矩阵表示仿射变换如下:

\begin{bmatrix}{x}' \\ {y}' \\ {z}' \\ 1 \end{bmatrix}=\begin{bmatrix} a & b & c&t_{x} \\ d& e& f& t_{y}\\ g& h& i& t_{z}\\ 0& 0 & 0 &1 \end{bmatrix}\begin{bmatrix} x\\ y\\ z\\ 1 \end{bmatrix}

A表示线性变换矩阵,T表示平移变换矩阵

\textbf{A}=\begin{bmatrix} a& b &c&0 \\ d&e &f &0\\ g& h & i &0\\0&0&0&1\end{bmatrix}, \textbf{T}=\begin{bmatrix} 1&0&0&t_{x}\\0&1&0& t_{y}\\0&0&1& t_{z}\\0&0&0&1 \end{bmatrix}

仿射变换矩阵即令

\textbf{M}=\begin{bmatrix} a & b & c&t_{x} \\ d& e& f& t_{y}\\ g& h& i& t_{z}\\ 0& 0 & 0 &1 \end{bmatrix}

由于矩阵乘法不满足交换律,因而如何确定仿射变换矩阵MAT的关系?是线性变换还是先平移操作?

\textbf{M}=\textbf{A}\textbf{T}?\\ \textbf{M}=\textbf{T}\textbf{A}?

平移变换矩阵T和仿射变换矩阵M只差一个左侧3×3的单位矩阵,因而只需要想办法从M中凑出T即可

思路一:初等列变换

在保证第四列不变的情况下,用初等列变换就是一个好选择,建立增广矩阵经过初等列变换可得

\begin{bmatrix} \textbf{M}\\ \hline \textbf{I} \end{bmatrix}=\begin{bmatrix} a& b &c&t_x \\ d & e & f&t_y\\ g&h &i&t_z \\ 0&0&0&1\\ \hline 1&0 &0&0 \\ 0&1 &0 &0\\ 0& 0& 1&0\\0&0&0&1 \end{bmatrix}=\begin{bmatrix} 1&0&0&t_{x}\\0&1&0& t_{y}\\0&0&1& t_{z}\\0&0&0&1\\ \hline \begin{bmatrix} a & b &c \\ d& e &f \\ j& h&i \end{bmatrix}^{-1} &&&0\\ 0&&&1 \end{bmatrix}Q_1...Q_n\\ Q_1...Q_n=\begin{bmatrix} a & b &c &0\\ d& e &f &0\\ j& h&i&0\\0&0&0&1 \end{bmatrix}=\textbf{A}

因而则有M=TA

思路二:分块矩阵

M转化为分块矩阵

\textbf{M}=\left[\begin{array}{ccc|c} a & b & c&t_{x} \\ d& e& f& t_{y}\\ g& h& i& t_{z}\\\hline 0& 0 & 0 &1 \end{array} \right ]=\left[\begin{array}{cc} \textbf{B}&\textbf{\textit{t}}\\ 0&1 \end{array} \right ]

其中B是可逆矩阵,则等式两边同时乘以一个分块对角矩阵

\textbf{M}\begin{bmatrix} \textbf{B}^{-1} &0 \\ 0& 1 \end{bmatrix}=\begin{bmatrix} \textbf{B} &\textbf{\textit{t}} \\ 0& 1 \end{bmatrix}\begin{bmatrix} \textbf{B}^{-1} &0 \\ 0& 1 \end{bmatrix}=\begin{bmatrix} \textbf{I} &\textbf{\textit{t}} \\ 0& 1 \end{bmatrix},\textbf{I}=\begin{bmatrix} 1 &0 &0 \\ 0 & 1 &0 \\ 0 & 0 & 1 \end{bmatrix} 

 \begin{bmatrix} \textbf{B}^{-1} &0 \\ 0& 1 \end{bmatrix}^{-1}=\begin{bmatrix} \textbf{B} &0 \\ 0& 1 \end{bmatrix}

故有

 \textbf{M}\begin{bmatrix} \textbf{B}^{-1} &0 \\ 0& 1 \end{bmatrix}\begin{bmatrix} \textbf{B} &0 \\ 0& 1 \end{bmatrix}=\begin{bmatrix} \textbf{I} &\textbf{\textit{t}} \\ 0& 1 \end{bmatrix}\begin{bmatrix} \textbf{B} &0 \\ 0& 1 \end{bmatrix}\\\\ \textbf{M}=\begin{bmatrix} \textbf{I} &\textbf{\textit{t}} \\ 0& 1 \end{bmatrix}\begin{bmatrix} \textbf{B} &0 \\ 0& 1 \end{bmatrix}

因而则有M=TA 

综上,齐次坐标系下仿射变换即先进行线性变换再进行平移变换

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值