Project--3D Rigid Object Tracking -------chapter 3

这周我们大部分时间都在找代码,想着借鉴学习一下,但发现二维的图像跟踪代码比较多,三维的特别少。总共分3个部分进行学习,大致都是关于对视频中动态目标进行追踪:
1 罗音同学主要学习Matlab相关的对视频中动态目标进行追踪;
2 许佳琪同学学了一下openCV,调试了一个相关的程序;
3 我学了一下openCV,主要找一些三维方面的对目标进行追踪的代码,想根据老师给的文献5自己试着进行实现,还有依旧负责网站更新;
具体介绍看我的 Progress

Team & Project

课程名称: 图像分析与理解
项目名称: 3D Rigid Object Tracking
HeadLine: 6/17/2016
队员姓名:杨梅,许佳琪,罗音
华中科技大学 电子信息与通信学院

Introduction

The objective of 3D rigid object tracking is to associate 3D target objects in consecutive video frames and meanwhile estimate the relative pose (3D translation and 3D rotation) between the 3D targetand the camera. Rigid means the relative position among object components do not change. For instance, a cup, a book and a car are rigid object while a human face and a cat are non-rigid object. It has a variety of uses, some of which are: humancomputer interaction, security and surveillance, video communication and compression, augmented reality, traffic control, medical imaging and video editing.3D object tracking can be especially difficult when the objects are moving fast relative to the frame rate. Another situation that increases the complexity of the problem is when the tracked object changes orientation over time. For these situations the tracking system usually employs a motion model whichdescribes how the image of the target might change for different possible motions of the object.

Progress

一 关于Matlab

要不是做项目应该永远都不会用到Matlab的,要不是亲自体验,还不知道功能如此强大!罗音同学发现Matlab中有一些自带的多目标追踪的实例(要求版本R13a以上):可在D:\Program Files\MATLAB\R2014a\toolbox\vision\visiondemos找到。在命令窗口中输入”edit multiObjectTracking”就可以看到multiObjectTracking的代码,我们发现MATLAB还有自带的视频播放器,为了上传我主要学习了如何将Matlab跑出来的帧序列保存成.avi格式的视频,然后上传到YouTube详见如下链接:matlab写入/合成视频VideoWriter类(http://blog.163.com/yuyang_tech/blog/static/21605008320139854818157/)
这个追踪方法达到的效果如下:


它这个系统基于一个假设:所有被探测的物体做匀速直线运动,如果不是的话可能会出现错误,概括起来如下:
The detection of moving objects uses a background subtraction algorithm based on Gaussian mixture models. Morphological operations are applied to the resulting foreground mask to eliminate noise. Finally, blob analysis detects groups of connected pixels, which are likely to correspond to moving objects.
The association of detections to the same object is based solely on motion. The motion of each track is estimated by a Kalman filter. The filter is used to predict the track’s location in each frame, and determine the likelihood of each detection being assigned to each track.

More info: Motion-Based Multiple Object Tracking

二 关于openCV

为了最终做出3D的效果,我们想利用openCV的强大的图像处理功能,做了如下工作:
(1)配置openCV:http://blog.csdn.net/huang9012/article/details/21811129
(这个链接基本上解决了今后要用openCV运行时出现的所有让人抓狂的问题)
经验:千万注意lib库的配置(否则每次新建工程都得配置一遍)
(2)例子1:用openCV实现对视频中动态目标的追踪 http://wenku.baidu.com/view/0a3d2449f7ec4afe04a1dffa.html?from=search 第一次学习建立MFC对话框,发现学起来并不容易:要注意的地方:
1.使用OpenCVS函数库,要注意包含的头文件的顺序,要先包含VS的头文件在包含OpenCV的头文件
2.CFileDialog的用法:
http://www.cnblogs.com/doublesnke/archive/2011/07/19/2110341.html
http://blog.sina.com.cn/s/blog_915fe1f201019xx2.html
3.出现如下抓狂的错误:
test
More info: [处理方法]http://www.xuebuyuan.com/997244.html
依旧用Matlab用的原视频,处理效果如下:


(3)例子2:我们写的代码,效果如下:
test
test

Next Plan

做出3D的刚体目标追踪效果

参考代码:

More info: 我的github

References

[1]. Multiple 3D Object Tracking for Augmented Reality, In ISMAR, 2008.
[2]. https://www.ssontech.com/tutes/tuteobj.html
[3]. Manipulator and Object Tracking for In-Hand 3D Object Modeling, IN IJRR, 2011.
[4]. Robust Statistics for 3D Object Tracking, In ICRA 2006.
[5]. Real-time 3D Object Pose Estimation and Tracking for Natural Landmark Based Visual Servo. In IROS.