ORBSLAM2 Project 4(for) Windows Platform
Easy built orbslam2 by visual studio on windows of both debug and release mode
- Original ORBSLAM2 project: ORB_SLAM2
- Eigen and Pangolin in Thirdparty are extracted from Phylliida/orbslam-windows/Thirdparty
- OpenCV
- Version is not required, but not too old. In this tutorial is 2.4.13.
- Add
YOUR_OWN_PATH\opencv\build;YOUR_OWN_PATH\opencv\build\x64\vc12\bin;to your environment variable "PATH", you can also addYOUR_OWN_PATH\opencv\build\x86\vc12\bin;if you want to bulid a x86 type application.
- Cmake
- Version should at least be 2.8.
- Visual Studio
- In this tutorial is VS2013(Corresponding to opencv's vc12).
So, we'll build a visual studio 2013 project of ORB_SLAM2 using cmake and then make a x64 app.
First, we'll compile the projects in Thirdparty folder.
- Open cmake-gui, select DBow2 folder as the source path and the DBow2/build folder as the binaries path.
- Click configure, select Visual Studio 12 2013 Win64(or your own) as the generator, click finish.
- After configure done, click Generate.
- Go to the DBow2/build folder, double click the DBoW2.sln to open the peoject.
- Build ALL_BUILD in either debug or release mode you want.
- After success build, the libraries will be in the lib folder of the DBow2 project source folder.
eigen is not need to be built
- Open cmake-gui, select g2o folder as the source path and the g2o/build folder as the binaries path.
- Click configure, select Visual Studio 12 2013 Win64(or your own) as the generator, click finish.
- After configure done, click Generate.
- Go to the g2o/build folder, double click the g2o.sln to open the peoject.
- Right click on the g2o project->Properties->C/C++->Preprocessor Definitions, add WINDOWS at the end row, click Apply and OK.
- Build ALL_BUILD in either debug or release mode you want. (Remind to repeat step 5 && Mode should be the same as DBoW2)
- After success build, the libraries will be in the lib folder of the g2o project source folder.
- Open cmake-gui, select Pangolin folder as the source path and the Pangolin/build folder as the binaries path.
- Click configure, select Visual Studio 12 2013 Win64(or your own) as the generator, click finish.
- After configure done, click Generate.
- Go to the Pangolin/build folder, double click the Pangolin.sln to open the peoject.
- Build ALL_BUILD in either debug or release mode you want. (Mode should be the same as DBoW2 && g2o).
- You'll get a error of "cannot open input file 'pthread.lib'", just ignore it.
- After success build, the libraries will be in the lib folder of the Pangolin project source folder.
- Open cmake-gui, select ORBSLAM24Windows folder as the source path and the ORBSLAM24Windows/build folder as the binaries path.
- Click configure, select Visual Studio 12 2013 Win64(or your own) as the generator, click finish.
- After configure done, click Generate.
- Go to the ORBSLAM24Windows/build folder, double click the ORB_SLAM2.sln to open the peoject.
- Choose either debug or release mode you want. (Mode should be the same as DBoW2 && g2o && Pangolin).
- Right click the ORB_SLAM2 project and then click generate.
- After success build, the libraries will be in the lib folder of the ORB_SLAM2 project source folder.
If you want to make apps, you can also build the mono-stero-RGBD projects provided.
(Build mode should be the same as DBoW2 && g2o && Pangolin && ORB_SLAM2).
The picture shows the result of mono TUM dataset.

