重投影误差和光度误差与雅可比矩阵

在这里插入图片描述
2*6的那个雅克比矩阵是误差对于扰动的小量位姿的偏导数。
g2o优化过程中,要在linearizeOplus()中则需要写清楚误差分别对于所绑定的顶点的偏导数,来进行变量更新。
首先要看清观测值是像素还是相机坐标系下的点。
观测值是像素,绑定顶点是位姿

//_jacobianOplusXj是误差关于位姿扰动小量的偏导
//_jacobianOplusXj本质上是由两项相乘得到
//第一项,其实是误差关于相机坐标系下坐标点的偏导,也就是-1./z * tmp
//第二项,其实是相机坐标系下坐标点关于位姿扰动小量的偏导//两项相乘,得到下面的jacobianOplusXj
_jacobianOplusXj ( 0,0 ) =  x*y/z_2 *camera_->fx_;
_jacobianOplusXj ( 0,1 ) = - ( 1+ ( x*x/z_2 ) ) *camera_->fx_;
_jacobianOplusXj ( 0,2 ) = y/z * camera_->fx_;
_jacobianOplusXj ( 0,3 ) = -1./z * camera_->fx_;
_jacobianOplusXj ( 0,4 ) = 0;
_jacobianOplusXj ( 0,5 ) = x/z_2 * camera_->fx_; 
_jacobianOplusXj ( 1,0 ) = ( 1+y*y/z_2 ) *camera_->fy_;
_jacobianOplusXj ( 1,1 ) = -x*y/z_2 *camera_->fy_;
_jacobianOplusXj ( 1,2 ) = -x/z *camera_->fy_;
_jacobianOplusXj ( 1,3 ) = 0;
_jacobianOplusXj ( 1,4 ) = -1./z *camera_->fy_;
_jacobianOplusXj ( 1,5 ) = y/z_2 *camera_->fy_;

观测值是相机坐标系下三维点,绑定顶点是位姿

_jacobianOplusXj ( 0,0 ) = 0;   
_jacobianOplusXj ( 0,1 ) = -z;     
_jacobianOplusXj ( 0,2 ) = y;   
_jacobianOplusXj ( 0,3 ) = -1;  
_jacobianOplusXj ( 0,4 ) = 0;  
_jacobianOplusXj ( 0,5 ) = 0;   
_jacobianOplusXj ( 1,0 ) = z;  
_jacobianOplusXj ( 1,1 ) = 0;  
_jacobianOplusXj ( 1,2 ) = -x;    
_jacobianOplusXj ( 1,3 ) = 0;    
_jacobianOplusXj ( 1,4 ) = -1;   
_jacobianOplusXj ( 1,5 ) = 0;    
_jacobianOplusXj ( 2,0 ) = -y;    
_jacobianOplusXj ( 2,1 ) = x;    
_jacobianOplusXj ( 2,2 ) = 0;    
_jacobianOplusXj ( 2,3 ) = 0;    
_jacobianOplusXj ( 2,4 ) = 0;   
_jacobianOplusXj ( 2,5 ) = -1

当同时绑定坐标点作为优化顶点时,需要加_jacobianOplusXi作为误差关于坐标的偏导数。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值