ubuntu16.04 Laptop with webcam compilation run Ptam

Source: Internet
Author: User
Tags git clone

ubuntu16.04 Laptop with webcam compilation run Ptam

Reprint Please specify link: https://i.cnblogs.com/EditPosts.aspx?postid=9014147

Personal e-mail: [Email protected]

Key Laboratory of flight control integration technology of Beihang University

Ptam is an open-source algorithm for visual slam and has been used for augmented reality. The code is fully open source and can be obtained from GitHub: address

Author 2008 articles Parallel Tracking and mapping for Small AR workspaces

Support for compiling and running on multiple systems, you can get some installation tutorials on other systems on the author's Project homepage, author home: http://www.robots.ox.ac.uk/~gk/

My main attempt is to attempt to compile the Ptam on ubuntu16.04.

The specific installation process

A dependent library installation

1 Installing the Build tool

sudo apt-get  updatesudo apt-get install build-essential cmake pkg-config

2 Updating the C + + library

sudo apt-get install Libboost-dev Libboost-doc

3 Installing low-level libraries of linear algebra

sudo apt-get install Liblapack-dev Libblas-dev

4 Image io and camera driver

sudo apt-get install Libjpeg-dev libpng-dev libtiff-dev libdc1394-all-dev Libv4l-dev

5 Video Io, codec and video display library

sudo apt-get install Libavcodec-dev libavformat-dev libavutil-dev Libpostproc-dev Libswscale-dev Libavdevice-dev libsdl-devsudo apt-get install LIBGTK2. 0-dev Libgstreamer0. Ten-dev libgstreamer-plugins-base0. Ten

6 OpenGL

sudo apt-get install Mesa-common-dev Libgl1-mesa-dev libglu1-mesa-dev freeglut3-de

Two we're going to install Ptam's three third-party libraries

TooN LIBCVD Gvars3 have dependencies, so be sure to install in order, there is their version of the problem may also cause the installation is not successful, so, recommended to use the following version of the match, I have been verified to compile successfully, in the https:// Github.com/slowlythinking/ptam (which also contains the source code of Ptam, but there are problems);

Toon Library must be installed first

Get three of these libraries from Git

git clone https://github.com/slowlythinking/ptam.git

Then the Ptam folder is deleted, there is a problem in the file, we have to recompile.

TooN:

CD Toonsudo. /configure && make && sudo make installcd . /

LIBCVD:

CD Libcvdsudo. /configure--without-ffmpeg--without-v4lbuffer--without-dc1394v1--without-dc1394v2 sudo makesudo make INSTALLCD .. /

GVARS3:

sudo git clone git://github.com/edrosten/gvars.gitcd Gvarssudo. /configure--disable-widgetssudo makesudo make install

Finally, make the post-installation libs effective

Cd.. /sudo ldconfig

OPENCV installation can be installed according to the online tutorial.

Three compiler Ptam

Get the latest Ptam source from GitHub by entering the Ptam directory

git clone https://github.com/oxford-ptam/ptam-gpl.git ptamCD ptamgit checkout feature/ LINUXMINT15CD Srcmake

Compiled successfully CameraCalibrator , Ptam two executables CameraCalibrator for pre-calibration of the camera

Quad Run Ptam

First you need to download a checkerboard picture, perform camera calibration,

Go to the SRC directory of the previous step, execute./cameracalibrator, according to the hint, use the capframe in the upper right corner to take the frame, at least take different angles of more than 4 frames, After the end of the frame, press optimize, Calculates the camera essence matrix (focal length and other camera parameters). includes focal length F, camera center cx,cy, and two distortion coefficients.

./cameracalibrator

Once the calibration is complete, the output is given a camera.cfg file, which can then be executed./ptam

Cameracalibrator Run after running Ptam, start running when the need to initialize the map, users need to select two frames as the initialization of the data input, the procedure is to press the space bar, the program will calculate the frame of the fast corner point displayed on the image, and then do a slight translation , press the SPACEBAR again, and the initialization is complete. The top right of the interface has draw AR off and view map on, respectively, to display virtual items (four eyes here) on the plane and display the map information built by the software. The following is a run

Reference Tutorial:

47783077

46998235

Http://blog.sina.com.cn/s/blog_7b83134b0102wabk.html

ubuntu16.04 Laptop with webcam compilation run Ptam

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.