Day043 — librealsense with OpenCV

Jacky Tsang
2 min readMar 12, 2018

--

Here is how I install and run the example code of librealsense(v2.10.1) along with OpenCV(v3.4.1) on Windows.

First of all, I follow below instructions from RealSense GitHub project.

The whole instruction is easy to follow.

However, one thing to correct the instruction is that OpenCV_DIR in step 12, the specify CMake binaries folder step, is wrong. It should be c:/git/opencv-master/build, instead of c:/git/opencv-master, which is the build directory you defined in step 3, the input binaries locations step.

After running the example code, the program is prompting an error stating opencv_world341d.dll is not found. The solution for that error is as easy as to include the directory of that file into the “path” environment variable. I located mine and the directory containing it looks something like this:

C:\{your_path}\opencv\build\x64\vc14\bin

When you are building OpenCV, cmake already hinted you with a message, You might need to add C:\{your_path}\opencv\build\x64\vc14\bin to your PATH to be able to run your applications.

Remember to restart the application that you want the change to take effect on. In this case, may be the opened Visual Studio.

Please note that I am using the one in the vc14 folder as I build the project with Microsoft build tool 2015. Use vc15 if you are building with Microsoft build tool 2017, which comes with Visual Studio 2017.

There is two way to build openCV. First one would be the one described in the above instructions, downloading the source code and building the project from scratch yourself. The second one is to use a pre-built version of it from the release page of the OpenCV GitHub project. opencv-3.4.1-vc14_vc15.exe The executable is only compatible with vc14 and vc15. Run the exe file and its content will be extracted.

extracted content from the exe file

--

--

No responses yet