仿射变换=线性映射+平移,三维坐标系中表达为
在齐次坐标系下4×4矩阵表示仿射变换如下:
令A表示线性变换矩阵,T表示平移变换矩阵
仿射变换矩阵即令
由于矩阵乘法不满足交换律,因而如何确定仿射变换矩阵M与A和T的关系?是线性变换还是先平移操作?
平移变换矩阵T和仿射变换矩阵M只差一个左侧3×3的单位矩阵,因而只需要想办法从M中凑出T即可
思路一:初等列变换
在保证第四列不变的情况下,用初等列变换就是一个好选择,建立增广矩阵经过初等列变换可得
因而则有M=TA
思路二:分块矩阵
将M转化为分块矩阵
其中B是可逆矩阵,则等式两边同时乘以一个分块对角矩阵
由
故有
因而则有M=TA
综上,齐次坐标系下仿射变换即先进行线性变换再进行平移变换