How do I build the real time pose estimation tutorial on Visual Studio?

asked 2018-12-09 13:07:07 -0500

Hello, I'm using OpenCV 4.0.0 and trying to run the code here link text with Visual Studio 2015. I'm quite new in this OpenCV field and C++. In the tutorial folder, there are many cpp and header files image description ,

which ones should I add in my project? I know if a '.cpp' file includes specific header files, i should add/create that header file in my project. I tried to add the 'main_detection.cpp' and its following header file, but when I click debug it gives me this error

image description.

Either I didn't include the right '.cpp' and '.h' files, or I didnt put the correct path for the Data file ( box.ply, box.mp4 etc), or even both mistakes. Hopefully my question was understandable, and I appreciate any help given.

edit retag flag offensive close merge delete


If you want to test the tutorial code, you can also enable BUILD_EXAMPLES in CMake when building OpenCV.

Eduardo gravatar imageEduardo ( 2018-12-10 06:46:31 -0500 )edit

I'm using Opencv 4.0 but after selecting BUILD_EXAMPLES and building it, I tried to click the '.exe' file for the 'example_tutorial_pnp..." but nothing showed up. The console just quickly closed. Did I miss anything?

kumbulilalu gravatar imagekumbulilalu ( 2018-12-11 18:57:29 -0500 )edit

So now I'm using Opencv 3.4.3, built it using CMAKE and included BUILD_EXAMPLES. After that I build the ALL_BUILD and INSTALL, and for the "example_tutorial_pnp.." I also built it. The output was in "bin/debug" folder of my directory. So I clicked the "example_tutorial_pnp... exe" file and it gave me the error "Runtime Library Debug error, abort() has been called". What did I miss?

kumbulilalu gravatar imagekumbulilalu ( 2018-12-11 21:36:07 -0500 )edit

Have you found how to solve this error?

opencvr gravatar imageopencvr ( 2019-03-11 09:27:59 -0500 )edit