These are the steps I have followed to make the project work. I have translated my instructions from Spanish to English with the translator: https://www.deepl.com/translator
4º Download OpenCV 3.1 (it can be version 3.X, but not 4) and when you run it, unzip it in a folder. Do not put a path with spaces. I put it in "C:/", but it wouldn't be bad to put it in the project in "orbslam-windows\Thirdparty".
https://sourceforge.net/projects/opencvlibrary/files/opencv-win/3.1.0/
Note: other versions of OpenCV installed (e.g. through Python) may cause problems.
6º Open the project in "C:\opencv\build" with Visual Studio 2015.
Change from debug to release and second click on "Solution 'OpenCV'" and build the project.
7º In the document "orbslam-windows\Thirdparty\DBoW2\CakeLists.txt" and also in "orbslam-windows\CMakeLists.txt" comment this line:
find_package(OpenCV 3.0 QUIET)
and put this other one (put your route, the type of bar is important):
find_package(OpenCV 3.0 REQUIRED PATHS "C:/opencv/build")
Note: In Visual Studio, go to Tools -> Options -> Debugging -> Symbols and in "Symbol file (.pdb) locations", check "Microsoft symbol servers".
9º Copy all the content from "C:\opencv\build\bin\Release" to "orbslam-windows\Examples\Monocular\Release".
You should also copy the OpenNI2.dll library. It can be found on the PC itself, in my case it appeared in "C:\Program Files\OpenNI2\Tools" among others.
Note: You can download datasets for each version (mono_euroc, mono_kitti, mono_tum). The information can be found in the original project (4. Monocular Examples): https://github.com/raulmur/ORB_SLAM2
11º Unzip "orbslam-windows\Vocabulary\ORBvoc.txt.tar" in the same folder where it is located.
12º When opening it by console, the project failed with the error "Usage: ./mono_tum path_to_vocabulary path_to_settings path_to_image_folder path_to_times_file". With that error and the information from 4. Monocular Examples (https://github.com/raulmur/ORB_SLAM2),
in "orbslam-windows\Examples\Monocular\mono_euroc.cc" I changed this (line 38):
Note: I imagine that in the .cc of each project will come a different error and the unknown routes can be obtained from the original project (4. Monocular Examples): https://github.com/raulmur/ORB_SLAM2
I've published it here (https://github.com/Phylliida/orbslam-windows/issues/17), but I think it will be useful in this repository as well.
These are the steps I have followed to make the project work. I have translated my instructions from Spanish to English with the translator: https://www.deepl.com/translator
INSTRUCTIONS
1º Install Visual Studio 14 2015: https://visualstudio.microsoft.com/es/vs/older-downloads/
2º Install CMake and add it to the path in the installer: https://cmake.org/download/
3º Download the project: https://github.com/Phylliida/orbslam-windows
4º Download OpenCV 3.1 (it can be version 3.X, but not 4) and when you run it, unzip it in a folder. Do not put a path with spaces. I put it in "C:/", but it wouldn't be bad to put it in the project in "orbslam-windows\Thirdparty". https://sourceforge.net/projects/opencvlibrary/files/opencv-win/3.1.0/
5º Make the build with CMake as in the link. (The General procedure part is enough). https://perso.uclouvain.be/allan.barrea/opencv/cmake_config.html
6º Open the project in "C:\opencv\build" with Visual Studio 2015. Change from debug to release and second click on "Solution 'OpenCV'" and build the project.
7º In the document "orbslam-windows\Thirdparty\DBoW2\CakeLists.txt" and also in "orbslam-windows\CMakeLists.txt" comment this line:
find_package(OpenCV 3.0 QUIET)
and put this other one (put your route, the type of bar is important): find_package(OpenCV 3.0 REQUIRED PATHS "C:/opencv/build")
8º Follow the instructions step by step (except build mono_euroc): https://github.com/Phylliida/orbslam-windows
9º Copy all the content from "C:\opencv\build\bin\Release" to "orbslam-windows\Examples\Monocular\Release". You should also copy the OpenNI2.dll library. It can be found on the PC itself, in my case it appeared in "C:\Program Files\OpenNI2\Tools" among others.
10º Download the dataset "Machine Hall 01" (EuRoC): https://projects.asl.ethz.ch/datasets/doku.php?id=kmavvisualinertialdatasets Unzip it in a new folder "orbslam-windowsExamples\Monocular\datasets".
11º Unzip "orbslam-windows\Vocabulary\ORBvoc.txt.tar" in the same folder where it is located.
12º When opening it by console, the project failed with the error "Usage: ./mono_tum path_to_vocabulary path_to_settings path_to_image_folder path_to_times_file". With that error and the information from 4. Monocular Examples (https://github.com/raulmur/ORB_SLAM2), in "orbslam-windows\Examples\Monocular\mono_euroc.cc" I changed this (line 38):
for this:
13º Build the mono_euroc project with what was indicated here: https://github.com/Phylliida/orbslam-windows
14º Open the example in "orbslam-windows\Examples\Monocular\Release\mono_euroc.exe".