三维旋转沿轴分解

将旋转分解为固定参考坐标系的绕轴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∧))

相关推荐
厄罗萌多1 小时前
OpenCV学习 day3
opencv·学习·计算机视觉
小指纹1 小时前
图论-最短路Dijkstra算法
数据结构·c++·算法·深度优先·图论
赴3352 小时前
逻辑回归 银行贷款资格判断案列优化 交叉验证,调整阈值,下采样与过采样方法
算法·机器学习·逻辑回归·下采样·交叉验证·过采样·阈值
2501_924878733 小时前
无人机光伏巡检缺陷检出率↑32%:陌讯多模态融合算法实战解析
开发语言·人工智能·算法·视觉检测·无人机
沉睡的无敌雄狮3 小时前
无人机光伏巡检漏检率↓78%!陌讯多模态融合算法实战解析
人工智能·算法·计算机视觉·目标跟踪
格林威3 小时前
Baumer工业相机堡盟工业相机如何通过YoloV8深度学习模型实现各种食物的类型检测识别(C#代码UI界面版)
人工智能·深度学习·数码相机·yolo·计算机视觉
magicwt3 小时前
《从零构建大模型》读书笔记
算法
大胖猫L3 小时前
深搜与广搜在 TypeScript 类型递归中的应用
前端·算法
一碗白开水一4 小时前
【模型细节】FPN经典网络模型 (Feature Pyramid Networks)详解及其变形优化
网络·人工智能·pytorch·深度学习·计算机视觉
2202_756749694 小时前
02 基于sklearn的机械学习-KNN算法、模型选择与调优(交叉验证、朴素贝叶斯算法、拉普拉斯平滑)、决策树(信息增益、基尼指数)、随机森林
python·算法·决策树·随机森林·机器学习·sklearn