主要内容

本页翻译不是最新的。点击此处可查看最新英文版本。

rigid2d

(不推荐)使用后乘约定的二维刚性几何变换

不建议使用 rigid2d。请改用 rigidtform2d 对象。有关详细信息,请参阅版本历史记录

说明

rigid2d 对象存储有关二维刚性几何变换的信息,并支持正向变换和逆变换。

创建对象

描述

tform = rigid2d 创建对应于恒等变换的默认 rigid2d 对象。

tform = rigid2d(t)T 属性设置为指定的二维刚性变换矩阵 t

tform = rigid2d(rot,trans)RotationTranslation 属性分别设置为指定的旋转矩阵 rot 和平移向量 trans

示例

属性

全部展开

正向刚性变换,指定为 3×3 数值矩阵。矩阵 T 满足由下式给出的后乘约定:

[x y 1] = [u v 1] * Rotation + Translation

数据类型: single | double

变换的旋转分量,指定为 2×2 数值矩阵。

数据类型: single | double

变换的平移分量,指定为一个包含 2 个元素的数值行向量。

数据类型: single | double

此 属性 为只读。

几何变换的维度,指定为数字 2

对象函数

invertInvert geometric transformation
isTranslationDetermine if geometric transformation is pure translation
outputLimitsFind output spatial limits given input spatial limits
transformPointsForwardApply forward geometric transformation
transformPointsInverseApply inverse geometric transformation

示例

全部折叠

以度为单位指定旋转角度,并创建一个 2×2 旋转矩阵。

theta = 30;
rot = [ cosd(theta) sind(theta); ...
       -sind(theta) cosd(theta)];

分别指定水平和垂直平移量。

trans = [2 3];

创建一个执行旋转和平移的 rigid2d 对象。

tform = rigid2d(rot,trans)
tform = 
  rigid2d with properties:

       Rotation: [2×2 double]
    Translation: [2 3]

扩展功能

全部展开

版本历史记录

在 R2020b 中推出

全部折叠