发明名称 一种基于四元数的全景稳像方法
摘要 本发明涉及一种基于四元数的全景稳像方法,其特征在于具体步骤如下:1单相机的模型球建立、2基于角度的球面投影方法、3多球体模型融合方法、4基于四元数的全景球面稳像方法、5全景球的展开方法。其将多个球体模型进行归一化,并将多个球体模型的球面进行融合形成多相机成像系统的单帧全景球体模型;将前后两帧的全景球面图像进行特征点匹配,通过四元数的方法计算两个全景球之间的位姿关系,之后通过所求得的关系将球面图像进行变换,最后将全景球面上的信息还原到平面图像上,从而达到稳像效果。该方法能够有效解决由于全景相机系统中每个相机因为姿态变化不同而无法准确定位整体姿态变换的问题。
申请公布号 CN105208247A 申请公布日期 2015.12.30
申请号 CN201510551401.0 申请日期 2015.09.02
申请人 长春理工大学 发明人 方明;徐晶;付飞蚺;司书哲;任正玮;田颖
分类号 H04N5/21(2006.01)I;G06T7/00(2006.01)I 主分类号 H04N5/21(2006.01)I
代理机构 吉林长春新纪元专利代理有限责任公司 22100 代理人 王薇
主权项 一种基于四元数的全景稳像方法,其特征在于具体步骤如下:一、单相机的模型球建立首先使用张正友标定法对全景成像系统中的每个摄像机进行标定,得到每个相机的内参矩阵<img file="937440dest_path_image001.GIF" wi="19" he="22" />,<img file="42931dest_path_image002.GIF" wi="193" he="113" />内参矩阵中的<img file="962345dest_path_image003.GIF" wi="21" he="28" />与<img file="469681dest_path_image004.GIF" wi="23" he="24" />分别表示感光器件在<img file="183559dest_path_image005.GIF" wi="16" he="20" />方向与<img file="41925dest_path_image006.GIF" wi="17" he="21" />方向的偏移量,<img file="437134dest_path_image007.GIF" wi="25" he="30" />是在<img file="48244dest_path_image008.GIF" wi="16" he="18" />方向的像素焦距<img file="946405dest_path_image009.GIF" wi="22" he="32" />是在<img file="275755dest_path_image010.GIF" wi="14" he="17" />方向的像素焦距,通过内参矩阵中的<img file="287705dest_path_image011.GIF" wi="22" he="19" />与<img file="753321dest_path_image012.GIF" wi="22" he="23" />对每个相机所采集的图像进行畸变矫正,通过<img file="825314dest_path_image013.GIF" wi="15" he="15" />可以得到每个相机的像素焦距<img file="579643dest_path_image014.GIF" wi="18" he="22" />,选定右手坐标系建立球体模型,建立一个半径为焦距的球体模型,球体模型的球心坐标为(0,0,0);所建立的球体模型公式为:<img file="378972dest_path_image015.GIF" wi="195" he="27" />二、基于角度的球面投影方法图像坐标系为2D坐标系,而球体坐标系为3D坐标系,为了使球体模型能够准确的反应出相机成像模型,在这里才用了基于角度的球面投影方式;球坐标系上的任意一点<img file="715406dest_path_image016.GIF" wi="17" he="23" />可以通过<img file="207568dest_path_image017.GIF" wi="77" he="35" />来确定,其中<img file="999593dest_path_image018.GIF" wi="14" he="17" />为球体的半径,也就是原点<img file="540296dest_path_image019.GIF" wi="14" he="24" />与点<img file="246083dest_path_image016.GIF" wi="17" he="23" />的距离,<img file="394299dest_path_image020.GIF" wi="16" he="22" />为线段<img file="185538dest_path_image021.GIF" wi="26" he="22" />与<img file="77401dest_path_image022.GIF" wi="18" he="22" />轴正向的夹角,<img file="575379dest_path_image023.GIF" wi="18" he="23" />为线段<img file="143763dest_path_image024.GIF" wi="28" he="22" />在<img file="173030dest_path_image025.GIF" wi="41" he="21" />平面上的投影与<img file="117853dest_path_image026.GIF" wi="16" he="20" />轴的夹角,这里定义逆时针方向为正向;将点<img file="280456dest_path_image027.GIF" wi="18" he="20" />转换到右手坐标系下使用<img file="285321dest_path_image028.GIF" wi="82" he="35" />来表示为:<b><img file="723256dest_path_image029.GIF" wi="203" he="102" /></b>全景成像系统每个相机所采集的图像的大小为<img file="956922dest_path_image030.GIF" wi="104" he="21" />为图像的宽度,<img file="491809dest_path_image031.GIF" wi="18" he="24" />为图像的高度,在右手坐标系下球体模型中,原点<img file="152728dest_path_image032.GIF" wi="14" he="21" />为光心,<img file="77959dest_path_image033.GIF" wi="16" he="20" />轴为光轴,<img file="364584dest_path_image034.GIF" wi="17" he="22" />轴穿过图像的中心点,定义图像中心点的坐标为(0,1,0);那么对于相平面上的任意一点<img file="504709dest_path_image035.GIF" wi="15" he="24" />其坐标为<img file="851377dest_path_image036.GIF" wi="50" he="33" />,<img file="91602dest_path_image037.GIF" wi="14" he="17" />为在图像坐标系下的横向的像素坐标值,<img file="854021dest_path_image038.GIF" wi="16" he="15" />为在图像坐标系下纵向的像素坐标值;由此可以得到点<img file="97921dest_path_image039.GIF" wi="15" he="21" />与<img file="366222dest_path_image040.GIF" wi="18" he="19" />轴的正向夹角<img file="328362dest_path_image041.GIF" wi="15" he="22" />,以及<img file="894473dest_path_image042.GIF" wi="26" he="21" />在<img file="743611dest_path_image043.GIF" wi="37" he="19" />平面上的投影与<img file="432081dest_path_image044.GIF" wi="18" he="20" />轴的夹角<img file="632250dest_path_image045.GIF" wi="17" he="24" />,公式为:<img file="736472dest_path_image046.GIF" wi="287" he="115" />通过<img file="954964dest_path_image047.GIF" wi="80" he="33" />就完成了将图像投影到球面上;同时可以得到在右手坐标系下每个像素点的<img file="562138dest_path_image048.GIF" wi="82" he="34" />;三、多球体模型融合方法再得到全景系统每个相机的球体成像模型后需要将球体模型进行归一化处理,使每个相机的球体模型的半径为1,归一化方程为:<img file="170974dest_path_image049.GIF" wi="201" he="60" />这样针对所有相机构建的球体模型都是统一的单位球,以便于将全景系统进行融合;如相机C1与C2是相邻相机,将相邻相机同时采集的图像进行SIFT匹配,在通过RANSAC方法过滤外点,并将这些特征点的3D坐标保存下来记为<img file="406783dest_path_image050.GIF" wi="20" he="26" />与<img file="230514dest_path_image051.GIF" wi="21" he="26" />,则两个相机所建立的球体模型之间通过这些同名点对构成如下关系:<img file="198470dest_path_image052.GIF" wi="120" he="27" />R为相邻相机的模型球的旋转矩阵,通过这个旋转矩阵就可以将全景相机的图像进行融合,融合为一个全景的球体模型;四、基于四元数的全景球面稳像方法将<img file="356919dest_path_image053.GIF" wi="14" he="24" />时刻与<img file="615993dest_path_image054.GIF" wi="51" he="21" />时刻生成的全景球面进行特征点匹配,记录所有特征点的坐标,并对这些点进行过滤优化,选取最优点;将全景球的3D坐标系转化为虚坐标系,坐标系的三个虚轴<img file="809077dest_path_image055.GIF" wi="63" he="24" />均用来表示三个轴的旋转量,这样对应于球面上的一点<img file="760983dest_path_image056.GIF" wi="79" he="24" />,对应于虚坐标系下的四元数表示为<img file="406728dest_path_image057.GIF" wi="183" he="23" />;对于左右两个球面的<img file="472423dest_path_image058.GIF" wi="14" he="16" />对匹配点云<img file="457697dest_path_image059.GIF" wi="58" he="22" />,定义如下3*3的<img file="829772dest_path_image060.GIF" wi="25" he="21" />矩阵:<img file="713546dest_path_image061.GIF" wi="154" he="56" /><img file="766952dest_path_image062.GIF" wi="11" he="11" />矩阵的元素是由两个球面坐标系对应的3D球面坐标累积和与差组成;恰好,该矩阵包含了利用最小二乘求解旋转的所需所有信息;重新定义<img file="669049dest_path_image063.GIF" wi="18" he="19" />矩阵,令其元素独立:<img file="962758dest_path_image064.GIF" wi="222" he="109" />其中,<img file="317516dest_path_image065.GIF" wi="387" he="58" />其余元素同上;因此,10自由度的4*4实对称阵<img file="987663dest_path_image066.GIF" wi="18" he="18" />是由<img file="681950dest_path_image067.GIF" wi="25" he="20" />矩阵的9个元素不同代数和组成,其中,对角线和为0,<img file="395828dest_path_image068.GIF" wi="19" he="17" />矩阵的定义如下:<img file="251264dest_path_image069.GIF" wi="554" he="90" />计算<img file="708790dest_path_image070.GIF" wi="24" he="21" />矩阵的特征值,其中<img file="70632dest_path_image071.GIF" wi="18" he="23" />是4*4的单位矩阵,<img file="158674dest_path_image072.GIF" wi="20" he="23" />为特征值,<img file="488024dest_path_image073.GIF" wi="226" he="30" />获取最大特征值<img file="234395dest_path_image074.GIF" wi="32" he="33" />对应的特征向量<img file="965590dest_path_image075.GIF" wi="19" he="25" />便为匹配点云对应的四元数,<img file="224533dest_path_image076.GIF" wi="199" he="45" />通过这些最优点对的四元数表示方法计算两个全景球的相对球面位姿关系,从而求得全景成像系统在<img file="526333dest_path_image077.GIF" wi="15" he="22" />时刻与<img file="591241dest_path_image078.GIF" wi="64" he="24" />时刻的运动特性,进而得出两个球面之间的变换关系,实现对球面图像的抖动进行反向补偿,达到稳像效果;五、全景球的展开方法对全景球的球面图像进行姿态抖动抑制后得到稳定的全景单帧图像,需要使用球面到平面的投影方式将其恢复为平面全景图像,并将这些全景图像还原为视频序列。
地址 130022 吉林省长春市卫星路7186号科技大厦B座1603室