图像(点)绕任意中心位置旋转的旋转矩阵推导

1 以原点为中心的旋转矩阵推导

为了推导绕任意中心位置旋转的旋转矩阵,可以先从简单绕原点旋转开始推导。

假设有点 P ( x a , x b ) P(x_a,x_b) P(xa,xb),绕原点顺时针旋转了 θ \theta θ度后,求其旋转矩阵 T \boldsymbol{T} T(图1)。

图1

P绕原点顺时针旋转 θ \theta θ,可以看成是坐标轴逆时针旋转旋转 θ \theta θ,求P点在新坐标轴上的坐标(图2)。

图2

由上图可知, O P A → = [ x a y a ] , O P B → = [ x b y b ] \overrightarrow{OP_A}=\left[\begin{matrix}x_a \\ y_a\end{matrix} \right],\overrightarrow{OP_B}=\left[\begin{matrix}x_b \\ y_b\end{matrix} \right] OPA =[xaya],OPB =[xbyb],所求的便是 O P A → = T O P B → \overrightarrow{OP_A}=\boldsymbol{T}\overrightarrow{OP_B} OPA =TOPB 中的变换矩阵 T \boldsymbol{T} T

在图中作辅助线如下图(图3),可以知道
∠ A O B = ∠ A P D = θ O B = O A c o s θ B C = A D = A P s i n θ \angle AOB = \angle APD = \theta \\ OB=OAcos\theta\\ BC = AD = APsin\theta \\ AOB=APD=θOB=OAcosθBC=AD=APsinθ

x b = O B + O C = x a c o s θ + y a s i n θ x_b = OB+OC = x_acos\theta + y_asin\theta xb=OB+OC=xacosθ+yasinθ
同理可得
y b = − x a s i n θ + y a c o s θ y_b=-x_asin\theta + y_acos\theta yb=xasinθ+yacosθ

图3

转化为矩阵形式为
[ x b y b ] = [ c o s θ s i n θ − s i n θ c o s θ ] [ x a y a ] T = [ c o s θ s i n θ − s i n θ c o s θ ] \left[\begin{matrix}x_b \\ y_b\end{matrix} \right]=\left[\begin{matrix} cos\theta &sin\theta\\ -sin\theta&cos\theta \end{matrix}\right]\left[\begin{matrix}x_a \\ y_a\end{matrix} \right]\\ \boldsymbol{T}= \left[\begin{matrix} cos\theta &sin\theta\\ -sin\theta&cos\theta \end{matrix}\right] [xbyb]=[cosθsinθsinθcosθ

  • 14
    点赞
  • 52
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Largehare

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值