forked from shidahe/semidense-lines
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
shidah
committed
Jun 5, 2018
0 parents
commit 1a7cf65
Showing
390 changed files
with
192,909 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
CMakeLists.txt.user | ||
Examples/Monocular/mono_euroc | ||
Examples/Monocular/mono_kitti | ||
Examples/Monocular/mono_tum | ||
Examples/RGB-D/rgbd_tum | ||
Examples/ROS/ORB_SLAM2/CMakeLists.txt.user | ||
Examples/ROS/ORB_SLAM2/Mono | ||
Examples/ROS/ORB_SLAM2/MonoAR | ||
Examples/ROS/ORB_SLAM2/RGBD | ||
Examples/ROS/ORB_SLAM2/Stereo | ||
Examples/ROS/ORB_SLAM2/build/ | ||
Examples/Stereo/stereo_euroc | ||
Examples/Stereo/stereo_kitti | ||
KeyFrameTrajectory.txt | ||
Thirdparty/DBoW2/build/ | ||
Thirdparty/DBoW2/lib/ | ||
Thirdparty/g2o/build/ | ||
Thirdparty/g2o/config.h | ||
Thirdparty/g2o/lib/ | ||
Thirdparty/Line3Dpp/build/ | ||
Vocabulary/ORBvoc.txt | ||
Vocabulary/ORBvoc.bin | ||
build/ | ||
lib/ | ||
results_line_segments/ | ||
tools/bin_vocabulary | ||
|
||
|
||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
|
||
*~ | ||
|
||
# CLion | ||
.idea/ | ||
|
||
# VScode | ||
*/.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
project(ORB_SLAM2) | ||
|
||
IF(NOT CMAKE_BUILD_TYPE) | ||
SET(CMAKE_BUILD_TYPE Debug) | ||
ENDIF() | ||
|
||
MESSAGE("Build type: " ${CMAKE_BUILD_TYPE}) | ||
|
||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O3 -march=native -Wno-unused-function -Wno-return-type") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O3 -march=native -Wno-unused-function -Wno-return-type") | ||
|
||
# set carv needed flags | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__STDC_CONSTANT_MACROS -DGL_GLEXT_PROTOTYPES -D_LINUX -D_REENTRANT -DCGAL_USE_F2C -DCGAL_DISABLE_ROUNDING_MATH_CHECK") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS -DGL_GLEXT_PROTOTYPES -D_LINUX -D_REENTRANT -DCGAL_USE_F2C -DCGAL_DISABLE_ROUNDING_MATH_CHECK") | ||
|
||
# Check C++11 or C++0x support | ||
include(CheckCXXCompilerFlag) | ||
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) | ||
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X) | ||
if(COMPILER_SUPPORTS_CXX11) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | ||
add_definitions(-DCOMPILEDWITHC11) | ||
message(STATUS "Using flag -std=c++11.") | ||
elseif(COMPILER_SUPPORTS_CXX0X) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") | ||
add_definitions(-DCOMPILEDWITHC0X) | ||
message(STATUS "Using flag -std=c++0x.") | ||
else() | ||
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.") | ||
endif() | ||
|
||
LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules) | ||
|
||
find_package(OpenCV 3.0 QUIET) | ||
if(NOT OpenCV_FOUND) | ||
find_package(OpenCV 2.4.3 QUIET) | ||
if(NOT OpenCV_FOUND) | ||
message(FATAL_ERROR "OpenCV > 2.4.3 not found.") | ||
endif() | ||
endif() | ||
message(STATUS "Using opencv version ${OpenCV_VERSION}") | ||
find_package(Eigen3 3.1.0 REQUIRED) | ||
find_package(Pangolin REQUIRED) | ||
|
||
# find openmp | ||
find_package(OpenMP) | ||
if (OPENMP_FOUND) | ||
message("-- OpenMP found") | ||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") | ||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") | ||
endif() | ||
|
||
# Find CGAL | ||
set(CMAKE_BUILD_TYPE_BACKUP ${CMAKE_BUILD_TYPE}) | ||
set(CMAKE_BUILD_TYPE "Release") | ||
find_package(CGAL REQUIRED COMPONENTS Core) | ||
include( ${CGAL_USE_FILE} ) | ||
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_BACKUP}) | ||
# Find Boost | ||
find_package(Boost REQUIRED) | ||
include_directories(${Boost_INCLUDE_DIR}) | ||
link_directories(${Boost_LIBRARY_DIR}) | ||
# BLAS and LAPACK | ||
find_package(LAPACK REQUIRED) | ||
link_directories(${LAPACK_LIBRARY_DIR}) | ||
|
||
|
||
include_directories( | ||
${PROJECT_SOURCE_DIR} | ||
${PROJECT_SOURCE_DIR}/include | ||
${EIGEN3_INCLUDE_DIR} | ||
${Pangolin_INCLUDE_DIRS} | ||
${PROJECT_SOURCE_DIR}/Thirdparty/Line3Dpp | ||
${PROJECT_SOURCE_DIR}/Thirdparty/Line3Dpp/build | ||
${PROJECT_SOURCE_DIR}/Thirdparty/EDTest | ||
) | ||
|
||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib) | ||
|
||
add_library(${PROJECT_NAME} SHARED | ||
src/System.cc | ||
src/Tracking.cc | ||
src/LocalMapping.cc | ||
src/LoopClosing.cc | ||
src/ORBextractor.cc | ||
src/ORBmatcher.cc | ||
src/FrameDrawer.cc | ||
src/Converter.cc | ||
src/MapPoint.cc | ||
src/KeyFrame.cc | ||
src/Map.cc | ||
src/MapDrawer.cc | ||
src/Optimizer.cc | ||
src/PnPsolver.cc | ||
src/Frame.cc | ||
src/KeyFrameDatabase.cc | ||
src/Sim3Solver.cc | ||
src/Initializer.cc | ||
src/Viewer.cc | ||
src/ProbabilityMapping.cc | ||
src/Modeler.cc | ||
src/LineDetector.cc | ||
src/CARV/FreespaceDelaunayAlgorithm.cc | ||
src/CARV/GraphWrapper_Boost.cc | ||
src/CARV/lovimath.cc | ||
src/CARV/SFMTranscript.cpp | ||
src/CARV/SFMTranscriptInterface_Delaunay.cpp | ||
src/CARV/Matrix.cc | ||
src/CARV/StringFunctions.cpp | ||
src/CARV/Exception.cpp | ||
src/CARV/SFMTranscriptInterface_ORBSLAM.cpp | ||
) | ||
|
||
target_link_libraries(${PROJECT_NAME} | ||
${OpenCV_LIBS} | ||
${EIGEN3_LIBS} | ||
${Pangolin_LIBRARIES} | ||
${PROJECT_SOURCE_DIR}/Thirdparty/DBoW2/lib/libDBoW2.so | ||
${PROJECT_SOURCE_DIR}/Thirdparty/g2o/lib/libg2o.so | ||
${PROJECT_SOURCE_DIR}/Thirdparty/EDLines/EDLinesLib.a | ||
${PROJECT_SOURCE_DIR}/Thirdparty/EDTest/EDLib.a | ||
${PROJECT_SOURCE_DIR}/Thirdparty/Line3Dpp/build/libline3Dpp.so | ||
boost_system boost_filesystem boost_serialization | ||
lapack blas | ||
) | ||
|
||
# Build examples | ||
|
||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/Examples/RGB-D) | ||
|
||
add_executable(rgbd_tum | ||
Examples/RGB-D/rgbd_tum.cc) | ||
target_link_libraries(rgbd_tum ${PROJECT_NAME}) | ||
|
||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/Examples/Stereo) | ||
|
||
add_executable(stereo_kitti | ||
Examples/Stereo/stereo_kitti.cc) | ||
target_link_libraries(stereo_kitti ${PROJECT_NAME}) | ||
|
||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/Examples/Monocular) | ||
|
||
add_executable(mono_tum | ||
Examples/Monocular/mono_tum.cc) | ||
target_link_libraries(mono_tum ${PROJECT_NAME}) | ||
|
||
add_executable(mono_kitti | ||
Examples/Monocular/mono_kitti.cc) | ||
target_link_libraries(mono_kitti ${PROJECT_NAME}) | ||
|
||
add_executable(mono_euroc | ||
Examples/Monocular/mono_euroc.cc) | ||
target_link_libraries(mono_euroc ${PROJECT_NAME}) | ||
|
||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/tools) | ||
add_executable(bin_vocabulary | ||
tools/bin_vocabulary.cc) | ||
target_link_libraries(bin_vocabulary ${PROJECT_NAME}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
## List of Known Dependencies | ||
|
||
In this repo, other than the dependencies of ORB-SLAM2 described below, we include [EdgeDrawing](http://ceng.anadolu.edu.tr/CV/EdgeDrawing/) edge detection library in Thirdparty/EDTest folder. | ||
|
||
[EDLines](http://ceng.anadolu.edu.tr/cv/EDLines/) line detection library is included in Thirdparty/EDLines folder. | ||
|
||
[Line3D++](https://github.com/manhofer/Line3Dpp) line-based MVS library is included in Thirdparty/Line3Dpp folder. | ||
|
||
We also use [CGAL](https://www.cgal.org) in the process of surface reconstruction. | ||
|
||
The implementation of semi-dense mapping is modified from this [github repo](https://github.com/HeYijia/ORB_SLAM2). | ||
|
||
The surface reconstruction is modified from the work of David Lovi, which is described in [his thesis](https://era.library.ualberta.ca/items/0d2079b7-4a6d-47c6-8528-87478dbab309). | ||
|
||
[OpenMP](https://www.openmp.org/) is used for speeding up the semi-dense mapping a little. | ||
|
||
[Boost](https://www.boost.org/) is also used to make things easier. | ||
|
||
|
||
### ORB-SLAM2 version 1.0 | ||
|
||
In this document we list all the pieces of code included by ORB-SLAM2 and linked libraries which are not property of the authors of ORB-SLAM2. | ||
|
||
##### Code in **src** and **include** folders | ||
|
||
* *ORBextractor.cc*. | ||
This is a modified version of orb.cpp of OpenCV library. The original code is BSD licensed. | ||
|
||
* *PnPsolver.h, PnPsolver.cc*. | ||
This is a modified version of the epnp.h and epnp.cc of Vincent Lepetit. | ||
This code can be found in popular BSD licensed computer vision libraries as [OpenCV](https://github.com/Itseez/opencv/blob/master/modules/calib3d/src/epnp.cpp) and [OpenGV](https://github.com/laurentkneip/opengv/blob/master/src/absolute_pose/modules/Epnp.cpp). The original code is FreeBSD. | ||
|
||
* Function *ORBmatcher::DescriptorDistance* in *ORBmatcher.cc*. | ||
The code is from: http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel. | ||
The code is in the public domain. | ||
|
||
##### Code in Thirdparty folder | ||
|
||
* All code in **DBoW2** folder. | ||
This is a modified version of [DBoW2](https://github.com/dorian3d/DBoW2) and [DLib](https://github.com/dorian3d/DLib) library. All files included are BSD licensed. | ||
|
||
* All code in **g2o** folder. | ||
This is a modified version of [g2o](https://github.com/RainerKuemmerle/g2o). All files included are BSD licensed. | ||
|
||
##### Library dependencies | ||
|
||
* **Pangolin (visualization and user interface)**. | ||
https://github.com/stevenlovegrove/Pangolin | ||
|
||
* **OpenCV**. | ||
BSD licensed. | ||
|
||
* **Eigen3**. | ||
For versions greater than 3.1.1 is MPL2, earlier versions are LGPLv3. | ||
|
||
* **BLAS** (required by g2o). | ||
[Freely-available software](http://www.netlib.org/blas/#_licensing). | ||
|
||
* **LAPACK**(required by g2o). | ||
BSD licensed. | ||
|
||
* **ROS (Optional, only if you build Examples/ROS)**. | ||
BSD licensed. In the manifest.xml the only declared package dependencies are roscpp, tf, sensor_msgs, image_transport, cv_bridge, which are all BSD licensed. | ||
|
||
|
||
|
||
Updated: 23/01/2016 Raúl Mur Artal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
%YAML:1.0 | ||
|
||
#-------------------------------------------------------------------------------------------- | ||
# Camera Parameters. Adjust them! | ||
#-------------------------------------------------------------------------------------------- | ||
|
||
# Camera calibration and distortion parameters (OpenCV) | ||
Camera.fx: 458.654 | ||
Camera.fy: 457.296 | ||
Camera.cx: 367.215 | ||
Camera.cy: 248.375 | ||
|
||
Camera.k1: -0.28340811 | ||
Camera.k2: 0.07395907 | ||
Camera.p1: 0.00019359 | ||
Camera.p2: 1.76187114e-05 | ||
|
||
# Camera frames per second | ||
Camera.fps: 20.0 | ||
|
||
# Color order of the images (0: BGR, 1: RGB. It is ignored if images are grayscale) | ||
Camera.RGB: 1 | ||
|
||
#-------------------------------------------------------------------------------------------- | ||
# ORB Parameters | ||
#-------------------------------------------------------------------------------------------- | ||
|
||
# ORB Extractor: Number of features per image | ||
ORBextractor.nFeatures: 1000 | ||
|
||
# ORB Extractor: Scale factor between levels in the scale pyramid | ||
ORBextractor.scaleFactor: 1.2 | ||
|
||
# ORB Extractor: Number of levels in the scale pyramid | ||
ORBextractor.nLevels: 8 | ||
|
||
# ORB Extractor: Fast threshold | ||
# Image is divided in a grid. At each cell FAST are extracted imposing a minimum response. | ||
# Firstly we impose iniThFAST. If no corners are detected we impose a lower value minThFAST | ||
# You can lower these values if your images have low contrast | ||
ORBextractor.iniThFAST: 20 | ||
ORBextractor.minThFAST: 7 | ||
|
||
#-------------------------------------------------------------------------------------------- | ||
# Viewer Parameters | ||
#--------------------------------------------------------------------------------------------- | ||
Viewer.KeyFrameSize: 0.05 | ||
Viewer.KeyFrameLineWidth: 1 | ||
Viewer.GraphLineWidth: 0.9 | ||
Viewer.PointSize:2 | ||
Viewer.CameraSize: 0.08 | ||
Viewer.CameraLineWidth: 3 | ||
Viewer.ViewpointX: 0 | ||
Viewer.ViewpointY: -0.7 | ||
Viewer.ViewpointZ: -1.8 | ||
Viewer.ViewpointF: 500 | ||
|
Oops, something went wrong.