Giter Site home page Giter Site logo

shadowver / librealsense-and-opencv-integration Goto Github PK

View Code? Open in Web Editor NEW

This project forked from caomw/librealsense-and-opencv-integration

0.0 1.0 0.0 18 KB

Simple Project for saving color, depth, ir and PointClouds, using librealsense and OpenCV.

C++ 100.00%

librealsense-and-opencv-integration's Introduction

Synopsis

This will be a simple that integrates OpenCV and Librealsense in Visual Studio 2013. The Sample Code will allow to display and save the acquired images.

When the "s" key is pressed the program saves the RGB, IR, Depth and the PointCloud. The point cloud is saved in a text file.

The Escape Key ends the program.

Be sure to edit the save path in main.cpp to edit the directory where the frames are saved.

Installation

Assuming that you have already installed OpenCV and librealsense, you should create a new project in VS2013.

So the first thing to do after creating the project is to define the target machine (x64 in my case) in the configuration manager. On the Project properties->Linker->Advanced confirm that you have target machine as MachineX64.

I have my instalation folder of librealsense in C:\librealsense\ and the opencv 3.1 in C:\opencv\opencv (you should adapt the following paths to your paths): Project Properties -> C/C++ -> General -> Additional Include Directories: C:\librealsense\include; C:\librealsense\examples; C:\opencv\opencv\build\include; C:\opencv\opencv\build\include\opencv Linker -> General -> Additional Library Directories: C:\librealsense\bin\x64; C:\opencv\opencv\build\x64\vc12\lib

You can also do this with property sheets (available in the repository -> Be sure you adapth those to your openCV and librealsense directories. The property sheet provided is for OPENCV 3.1 with all the extra_modules available in debug mode. Take that into account and if you use it adapth to your lib files)

Assuming that you have already build librealsense projects:

Linker -> Input -> Additional Dependencies: realsense-d.lib; opencv_ts300d.lib; opencv_world300d.lib (this libs are for OpenCV 3.0 In the descriptions there are property sheets for openCV 3.1 with the extra_modules, be sure to adapt them)

Problems you can find:

  • "The Application was unable to start correctly (0xc000007b)". This was only resolved after going to Configuration Properties -> Debugging -> Working Directory: C:\opencv\opencv\build\x64\vc12\bin. From what I read, it this error ir resolved by changind the working directory to a x64 folder (in my case it is x64 machine).
  • An error message saying that you are missing realsense-d.dll. Go to your environment variables and add C:\librealsense\bin\x64 to your PATH variable (adapt to your folder installation).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.