三维旋转沿轴分解

将旋转分解为固定参考坐标系的绕轴n\bold{n}n的旋转和正交轴旋转:
R=R⊥R∥ \bold{R}= \bold{R}{\perp} \bold{R}{\parallel} R=R⊥R∥
R∥=cos⁡θI+(1−cos⁡θ)nnT+sin⁡θn∧ \bold{R}_{\parallel}=\cos \theta \bold{I}+\left( 1-\cos \theta \right) \bold{n}\bold{n}^{T}+\sin \theta \bold{n}^{\wedge } R∥=cosθI+(1−cosθ)nnT+sinθn∧

使用最小二乘法估计绕轴旋转,目标函数是使正交轴旋转的角度最小
min⁡θarccos⁡(tr(RR∥−1)−12) \min_{\theta}\arccos\left(\dfrac{\rm{tr}\left(\bold{RR}_{\parallel}^{-1}\right)-1}{2}\right) θminarccos 2tr(RR∥−1)−1

上面的式子使用了旋转矩阵转欧拉角 的公式

由于arccos⁡\arccosarccos函数单调递减,原问题变为

max⁡θtr(RR∥−1)=max⁡θtr(R(cos⁡θI+(1−cos⁡θ)nnT−sin⁡θn∧))=max⁡θ(cos⁡θtr(R−RnnT)−sin⁡θtr(Rn∧)) \begin{aligned} \max_{\theta} \rm{tr}\left(\bold{RR}{\parallel}^{-1}\right) &=\max{\theta}\rm{tr}\left(\bold{R}\left(\cos \theta \bold{I}+\left( 1-\cos \theta \right) \bold{n}\bold{n}^{T}-\sin \theta \bold{n}^{\wedge } \right)\right)\\ &=\max_{\theta}\left(\cos \theta \rm{tr}\left(\bold{R} - \bold{R}\bold{n}\bold{n}^{T}\right)-\sin\theta\rm{tr}\left(\bold{R}\bold{n}^{\wedge }\right)\right) \end{aligned} θmaxtr(RR∥−1)=θmaxtr(R(cosθI+(1−cosθ)nnT−sinθn∧))=θmax(cosθtr(R−RnnT)−sinθtr(Rn∧))

对θ\thetaθ求导得
−sin⁡θtr(R−RnnT)−cos⁡θtr(Rn∧)=0tan⁡θ=tr(Rn∧)tr(nTRn)−tr(R)θ=arctan⁡(tr(Rn∧)tr(nTRn)−tr(R)) \begin{aligned} -\sin\theta\rm{tr}\left(\bold{R} - \bold{R}\bold{n}\bold{n}^{T}\right)-\cos\theta\rm{tr}\left(\bold{R}\bold{n}^{\wedge }\right)&=0\\ \tan\theta&=\dfrac{\rm{tr}\left(\bold{R}\bold{n}^{\wedge }\right)}{\rm{tr}\left(\bold{n}^{T}\bold{R}\bold{n}\right)-\rm{tr}\left(\bold{R}\right) }\\ \theta&=\arctan\left(\dfrac{\rm{tr}\left(\bold{R}\bold{n}^{\wedge }\right)}{\rm{tr}\left(\bold{n}^{T}\bold{R}\bold{n}\right)-\rm{tr}\left(\bold{R}\right) }\right) \end{aligned} −sinθtr(R−RnnT)−cosθtr(Rn∧)tanθθ=0=tr(nTRn)−tr(R)tr(Rn∧)=arctan(tr(nTRn)−tr(R)tr(Rn∧))

相关推荐
AI科技星几秒前
全域数学·第卷:场计算机卷(场空间计算机)【乖乖数学】
java·开发语言·人工智能·算法·机器学习·数学建模·数据挖掘
Deepoch2 分钟前
数学模型驱动:Deepoc 低幻觉数学大模型助力发动机全周期智能优化
人工智能·算法·机器学习·deepoc·数学大模型·低幻觉
嘻嘻哈哈樱桃11 分钟前
牛客经典101题解题集--贪心算法+模拟
java·python·算法·贪心算法
AKDreamer_HeXY11 分钟前
QOJ 12255 - 36 Puzzle 题解
数据结构·c++·数学·算法·icpc·qoj
AI科技星20 分钟前
《全域数学》第一部 数术本源 第三卷 代数原本第14篇 附录二 猜想证明【乖乖数学】
人工智能·算法·数学建模·数据挖掘·量子计算
Wect34 分钟前
LeetCode 72. 编辑距离:动态规划经典题解
前端·算法·typescript
憨波个42 分钟前
【说话人日志】DOVER-Lap:overlap-aware diarization 输出融合算法
人工智能·深度学习·算法·音频·语音识别
叼烟扛炮1 小时前
C++第四讲:类和对象(下)
c++·算法·类和对象
Rabitebla1 小时前
vector 的骨架:三根指针、模板陷阱与迭代器失效的第一现场
开发语言·数据结构·c++·算法
代码不停1 小时前
BFS解决floodfill算法题目练习
算法·宽度优先