黑马程序员技术交流社区

标题: 【上海校区】视觉里程计简介 [打印本页]

作者: 不二晨    时间: 2018-8-6 09:36
标题: 【上海校区】视觉里程计简介
视觉里程计简介什么是视觉里程计?

首先我们看一看维基百科的介绍在机器人和计算机视觉问题中,视觉里程计就是一个通过分析处理相关图像序列来确定机器人的位置和姿态。
In robotics and computer vision, visual odometry is the process of determining the position and orientation of a robot by analyzing the associated camera images.
我们知道在汽车中有一个里程计,记录着汽车行驶的距离,可能的计算方式就是通过计算车轮滚动的次数乘以轮子的周长,但是里程计会遇到精度的问题,例如轮子打滑,随着时间的增加,误差会变得越来越大。另外在我们机器人和视觉领域,不仅仅要知道行驶的距离,而且要知道机器人行驶的整个轨迹(机器人每个时刻的位置和姿态)我们记着在时间t时刻机器人的位置和姿态信息是<span class="MathJax" id="MathJax-Element-98-Frame" tabindex="0" data-mathml="(xt,yt,zt,&#x3C8;t,&#x3C7;t,&#x3D5;t)" role="presentation" style="box-sizing: border-box; outline: 0px; display: inline; line-height: normal; text-align: left; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; word-break: break-all; position: relative;">(xt,yt,zt,ψt,χt,ϕt)(xt,yt,zt,ψt,χt,ϕt),其中<span class="MathJax" id="MathJax-Element-99-Frame" tabindex="0" data-mathml="xt,yt,zt" role="presentation" style="box-sizing: border-box; outline: 0px; display: inline; line-height: normal; text-align: left; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; word-break: break-all; position: relative;">xt,yt,ztxt,yt,zt表示机器人在世界坐标系中的位置信息,<span class="MathJax" id="MathJax-Element-100-Frame" tabindex="0" data-mathml="&#x3C8;t,&#x3C7;t,&#x3D5;t" role="presentation" style="box-sizing: border-box; outline: 0px; display: inline; line-height: normal; text-align: left; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; word-break: break-all; position: relative;">ψt,χt,ϕtψt,χt,ϕt表示机器人的姿态,分布表示为roll(<span class="MathJax" id="MathJax-Element-101-Frame" tabindex="0" data-mathml="&#x3C8;t" role="presentation" style="box-sizing: border-box; outline: 0px; display: inline; line-height: normal; text-align: left; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; word-break: break-all; position: relative;">ψtψt), pitch(<span class="MathJax" id="MathJax-Element-102-Frame" tabindex="0" data-mathml="&#x3C7;t" role="presentation" style="box-sizing: border-box; outline: 0px; display: inline; line-height: normal; text-align: left; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; word-break: break-all; position: relative;">χtχt),yaw(<span class="MathJax" id="MathJax-Element-103-Frame" tabindex="0" data-mathml="&#x3D5;t" role="presentation" style="box-sizing: border-box; outline: 0px; display: inline; line-height: normal; text-align: left; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; word-break: break-all; position: relative;">ϕtϕt)
确定机器人轨迹的方法有很多,我们这里主要讲述的是视觉里程计,正如维基百科所述,我们将一个摄像头(或多个摄像头)刚性连接到一个移动的物体上(如机器人),通过摄像头采集的视频流来确定相机的6自由度,如果使用1个摄像头,则称为单目视觉里程计,如果使用两个(或者更多)摄像机,则称为立体视觉里程计。

单目或立体视觉里程计

主要阐述两者之间的优缺点,立体视觉里程计的优点在于可以估算出精确的轨迹,单目估计的轨迹存在一个比例因子,所以对于单目VO,我们可以说的是机器人在X方向上移动了一个单位,但是对于立体VO,我们可以说机器人在X方向上移动了1米。另外对于立体VO计算的轨迹通常更精确(因为提供了更多的数据),但是在有些情况下,如相见与观测物体的距离相距太远(与立体VO中的两个相机之间的距离进行对比),这样立体VO就退化为单目VO,另外考虑设备的装配,单目更有一些优势,比如在一些非常小的机器人上

基本算法过程

主要阐述简单的算法过程,基于OpenCV3.0进行简单实现,后期进行扩展,对效率及精度进行一步步优化。

输入输出基本过程

作者: 不二晨    时间: 2018-8-9 17:38
奈斯




欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2