• 86+15927660902
  • zqzhang2015@gmail.com

Project

Progess
第一周 建立网址
第二周 熟悉Android Studio的各种基本操作,阅读论文
阅读论文
*张志强:Image-based 3D scene reconstruction and exploration in augmented reality

*李磊:Scene Reconstruction and Visualization from Internet Photo Collections,PhD Thesis, 2008.

*刘路阔:Joint 3D Scene Reconstruction and Class Segmentation

*柳杨光:Multi-camera scene reconstruction via graph cuts, In ECCV 2002.

编程练习

在对Android Studio有了初步了解以后,动手设计了一个登陆界面。

关于新建项目的步骤这里就不一一展开了,最终在project下创建了login项目

展开res/layout,点击打开activity_main.xml文件,在这个文件里我们将完成登录界面的编写

得到初始界面以后,将activity_main.xml的代码替换成如下代码:

[用户登录界面]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center_vertical"
android:stretchColumns="0,3">
<TableRow>
<TextView />
<TextView
android:text="账 号:"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24px"
/>
<EditText
android:id="@+id/account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24px"
android:minWidth="220px"/>
<TextView />
</TableRow>
<TableRow android:layout_marginTop="20px">
<TextView />
<TextView
android:text="密 码:"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<EditText
android:id="@+id/pwd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="220px"
android:textSize="24px"
android:inputType="textPassword"/>
<TextView />
</TableRow>
<TableRow android:layout_marginTop="20px">
<TextView />
<Button
android:id="@+id/login"
android:text="登录"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<Button
android:id="@+id/quit"
android:text="退出"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView />
</TableRow>
</TableLayout>

预览效果如图

第三周 数据集测试(LSD-SLAM)

title: 基于Ubuntu14.04+LSD_SLAM的indigo数据集测试
layout: post
date: 2016-06-01 22:10:37
tags:


原文地址:http://blog.csdn.net/gobitan/article/details/51541977#comments

摘要:LSD-SLAM是一个实时的单目SLAM. 它能实时地在电脑上直接(不使用关键点和特征)创建大规模的半稠密地图,甚至可以运行在智能手机上,如Android/iOS.

搭建Ubuntu14.04.4+ROS indigo基础环境

ubuntu官网下载ubuntu-14.04.4-desktop-i386.iso安装包,大约1G.

备注:因为ROS包含rviz可视化环境,因此需要选择桌面版。

将安装源换成阿里云的,如何换请参考http://mirrors.aliyun.com/help/ubuntu;

备注:强烈建议将安装源换成国内的,否则安装的时候要么速度慢,要么可能连不上。

在Ubuntu14.04.4中安装ROS indigo,参考:http://wiki.ros.org/indigo/Installation/Ubuntu

1
2
3
4
5
dennis@ubuntu:~$ sudo apt-get update
dennis@ubuntu:~$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
dennis@ubuntu:~$ sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net --recv-key 0xB01FA116
dennis@ubuntu:~$ sudo apt-get update
dennis@ubuntu:~$ sudo apt-get install ros-indigo-desktop-full

备注:这里采用的完整安装模式.

1
2
dennis@ubuntu:~$ sudo rosdep init
dennis@ubuntu:~$ rosdep update

1
2
dennis@ubuntu:~$ echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
dennis@ubuntu:~$ source ~/.bashrc

校验安装是否成功,输入roscore命令,如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
dennis@ubuntu:~$ roscore
... logging to /home/dennis/.ros/log/9f2ace00-16b9-11e6-a10c-000c29b0df82/roslaunch-ubuntu-2078.log
Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ubuntu:44364/
ros_comm version 1.11.19

SUMMARY

PARAMETERS
* /rosdistro: indigo
* /rosversion: 1.11.19

NODES

auto-starting new master
process[master]: started with pid [2090]
ROS_MASTER_URI=http://ubuntu:11311/

setting /run_id to 9f2ace00-16b9-11e6-a10c-000c29b0df82
process[rosout-1]: started with pid [2103]
started core service [/rosout]

安装ROS工具

1
dennis@ubuntu:~$ sudo apt-get install python-rosinstall

初始化ros编译环境及编译lsd_slam

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
dennis@ubuntu:~$ mkdir ~/rosbuild_ws
dennis@ubuntu:~$ cd ~/rosbuild_ws/
dennis@ubuntu:~/rosbuild_ws$ rosws init . /opt/ros/indigo
dennis@ubuntu:~/rosbuild_ws$ mkdir package_dir
dennis@ubuntu:~/rosbuild_ws$ rosws set ~/rosbuild_ws/package_dir -t .
dennis@ubuntu:~/rosbuild_ws$ echo "source ~/rosbuild_ws/setup.bash" >> ~/.bashrc
dennis@ubuntu:~/rosbuild_ws$ bash
dennis@ubuntu:~/rosbuild_ws$ cd package_dir/
dennis@ubuntu:~/rosbuild_ws/package_dir$
dennis@ubuntu:~/rosbuild_ws/package_dir$ sudo apt-get install ros-indigo-libg2o ros-indigo-cv-bridge
liblapack-dev libblas-dev freeglut3-dev libqglviewer-dev libsuitesparse-dev libx11-dev
dennis@ubuntu:~/rosbuild_ws/package_dir$ git clone https://github.com/tum-vision/lsd_slam.git lsd_slam
dennis@ubuntu:~/rosbuild_ws/package_dir$ ls -lrt
total 4
drwxrwxr-x 5 dennis dennis 4096 May 8 03:30 lsd_slam
dennis@ubuntu:~/rosbuild_ws/package_dir$ rosmake lsd_slam

采用官方提供的数据集进行测试

备注:数据集下载请参考本文的参考资料[2].

测试方法一(采用官方数据集LSD_foodcourt的images)

1
2
3
winter@winter-PC:~$ roscore   //执行后新建终端
winter@winter-PC:~$ rosrun lsd_slam_viewer viewer //执行后再新建终端
winter@winter-PC:~$ rosrun lsd_slam_core dataset_slam _files:=/home/winter/LSD_DataSet/LSD_foodcourt/images _hz:=0 _calib:=/home/winter/LSD_DataSet/LSD_foodcourt/cameraCalibration.cfg

slam_depthslam_viewer

测试方法二(采用官方数据集LSD_room.bag文件)

1
2
3
4
winter@winter-PC:~$ roscore
winter@winter-PC:~$ rosrun lsd_slam_viewer viewer
winter@winter-PC:~$ rosrun lsd_slam_core live_slam image:=/image_raw camera_info:=/camera_info
winter@winter-PC:~$ rosbag play LSD_room.bag

slam_depthslam_viewer

参考资料

[1] https://github.com/tum-vision/lsd_slam LSD_SLAM官网
[2] http://vision.in.tum.de/research/vslam/lsdslam 德国慕尼黑工业大学(TUM)计算机视觉组
[3] http://wiki.ros.org/indigo/Installation/Ubuntu 在Ubuntu14.04.4上安装ROS Indigo
[4] http://releases.ubuntu.com/14.04/ 官网下载ubuntu-14.04.4-desktop-i386.iso
[5] http://wiki.ros.org/ROS/Tutorials 用于ROS安装成功之后的测试
[6] http://www.dev47apps.com/droidcam/linuxx/ 将手机摄像头的视频传输到电脑上的工具

第四周

对已有的源码的进行修改,实现LSD-SLAM在Android平台上的运行。

第五周

录制视频并对录制的视频进行tracking和mapping,实现SLAM,查看LSD-SLAM算法在Android
平台上的效果,最后制作PPT。

工程所需依赖、平台等信息如下:

Description:
Our task is to implement 3D reconstruction from multiple images.

Platform:
Ran LSD SLAM on PC or Android.

Building
PC:
Refer to the site: http://aitechnology.github.io/Project/

Android:
Request

Need to modify the path of OpenCV.mk in \$(LSD_SLAM_android)/app/main/jni/Android.mk line 109 and line 111 to the path
of OpenCV.mk your OpenCV4Android is installed.

e.g.
modify

1
2
line 109: include E:\Libraries\OpenCV-2.4.11-android-sdk\sdk\native\jni\OpenCV.mk
line 111: LOCAL_C_INCLUDE:= E:\Libraries\OpenCV-2.4.11-android-sdk\sdk\native\jni\include

to the path of OpenCV.mk your OpenCV4Android is installed.
slam

成果展示

LSDPC01_3倍速

从视频中可以看出,帧率基本在25-30之间,包含的深度信息较多时,处理的就会相对慢一点。

LSDPC02_3倍速

相比上面的数据集,对此数据集进行处理时的深度信息更多,因此帧率比上面要低一些。

LSDANDROID_FINAL_4.5倍速率

从视频可以看到,其帧率很低,主要受限于手机的处理能力。