LIBVISO2 for use under the Windows platform

Source: Internet
Author: User
Tags windows visual

LIBVISO2 Introduction

LIBVISO2 (Library for Visual Odometry 2) is a fast cross-platform C + + library used to calculate the 6DoF motion of a mobile monocular/binocular camera.

The binocular version is based on the re-projection error of minimizing sparse feature matching, and is more versatile (no motion model or installation limit is required, except that the input image needs to be corrected (rectified) and the calibration parameters are known). The Monocular version is also relatively experimental, using the 8-point method to estimate the base matrix, to estimate the absolute scale, and further assume that the camera moves at a known fixed height above the ground.

libviso2:http://www.cvlibs.net/software/libviso/

Windows Visual Studio uses LIBVISO2

In order to be able to compile and run LIBVISO2 under Windows Visual Studio, a certain configuration is required. Start with the new blank console application in vs. Here we choose to use the x64 platform and create a new include folder under the project directory to hold the necessary supporting files. Download these necessary libraries now.

Necessary support file download and build

In the readme of the LIBVISO2 folder: The following PNG libraries (libpng) and the C + + encapsulation (png++) of the library are required.

    • Libpng (http://www.libpng.org/pub/png/libpng.html) libpng downloaded version 1.6.32. Extract the new include folder into the project directory.
    • png++ (http://www.nongnu.org/pngpp/) (png++ is a header only, library, which means you don't need to build anything) here download P ng++ 0.2. Version 9. Unzip the Include folder into your project directory.
    • Zlib (https://sourceforge.net/projects/libpng/files/zlib/1.2.11/) (libpng required) Unzip the include folder into the project directory.

Build the libpng below:

    • The text editor opens include\lpng1632\projects\vstudio\zlib.props and modifies the zlib folder name to download the extracted zlib file name:<ZLibSrcDir>..\..\..\..\zlib-1.2.11</ZLibSrcDir>
    • Open Include\lpng1632\projects\vstudio\vstudio.sln. The x64 platform is used here (consistent with the demo test project). Set the Libpng project in the solution as the starting project, build (under Debug or Release, Debug here). After success, found in the include\lpng1632\projects\vstudio\x64\Debug libpng16.lib , zlib.lib as well libpng16.dll .
VS2015 Configuration
    • Header and source files that contain libviso2->src
    • Add Directories in VC + + directories->include directories 工程根目录\include
    • Add Directories in VC + + directories->include directories 工程根目录\include\lpng1632
    • Add Directories in VC + + directories->library directories 工程根目录\include\lpng1632\projects\vstudio\x64\Debug
    • In linker->input->additional dependencies, add libpng16.lib and zlib.lib
    • Place the Libpng16.dll in the project directory.
Some error handling
    • such as error C4996: ‘sprintf‘: This function or variable may be unsafe. processing: added in the Demo.cpp and Matrix.cpp file start locations #define _CRT_SECURE_NO_WARNINGS .
    • Error in ERROR.HPP: identifier "Strerror_r" is undefined. Treatment: In the ERROR.HPP start section will be #ifdef __STDC_LIB_EXT1__ revised to#if defined(__STDC_LIB_EXT1__) || defined(_WIN32)
Windows Edition uses download

Https://github.com/zhenboliu/libviso2_windows

Run display

Run Demo.cpp

LIBVISO2 for use under the Windows platform

Related Article

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.