├── 3rdparty ├── DBoW2 │ ├── CMakeLists.txt │ ├── LICENSE.txt │ ├── README.md │ ├── build │ │ ├── CMakeCache.txt │ │ ├── CMakeFiles │ │ │ ├── 3.5.1 │ │ │ │ ├── CMakeCXXCompiler.cmake │ │ │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ │ │ ├── CMakeSystem.cmake │ │ │ │ └── CompilerIdCXX │ │ │ │ │ ├── CMakeCXXCompilerId.cpp │ │ │ │ │ └── a.out │ │ │ ├── CMakeDirectoryInformation.cmake │ │ │ ├── CMakeOutput.log │ │ │ ├── DBoW2.dir │ │ │ │ ├── CXX.includecache │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── depend.internal │ │ │ │ ├── depend.make │ │ │ │ ├── flags.make │ │ │ │ ├── link.txt │ │ │ │ ├── progress.make │ │ │ │ └── src │ │ │ │ │ ├── DBoW2 │ │ │ │ │ ├── BowVector.cpp.o │ │ │ │ │ ├── FORB.cpp.o │ │ │ │ │ ├── FeatureVector.cpp.o │ │ │ │ │ ├── QueryResults.cpp.o │ │ │ │ │ └── ScoringObject.cpp.o │ │ │ │ │ └── DUtils │ │ │ │ │ ├── Random.cpp.o │ │ │ │ │ └── Timestamp.cpp.o │ │ │ ├── Makefile.cmake │ │ │ ├── Makefile2 │ │ │ ├── TargetDirectories.txt │ │ │ ├── cmake.check_cache │ │ │ ├── feature_tests.bin │ │ │ ├── feature_tests.cxx │ │ │ └── progress.marks │ │ ├── Makefile │ │ └── cmake_install.cmake │ ├── include │ │ ├── DBoW2 │ │ │ ├── BowVector.h │ │ │ ├── DBoW2.h │ │ │ ├── FBrief.h │ │ │ ├── FClass.h │ │ │ ├── FORB.h │ │ │ ├── FSurf64.h │ │ │ ├── FeatureVector.h │ │ │ ├── QueryResults.h │ │ │ ├── ScoringObject.h │ │ │ ├── TemplatedDatabase.h │ │ │ └── TemplatedVocabulary.h │ │ └── DUtils │ │ │ ├── DUtils.h │ │ │ ├── Random.h │ │ │ └── Timestamp.h │ ├── lib │ │ └── libDBoW2.so │ └── src │ │ ├── DBoW2 │ │ ├── BowVector.cpp │ │ ├── FORB.cpp │ │ ├── FeatureVector.cpp │ │ ├── QueryResults.cpp │ │ └── ScoringObject.cpp │ │ └── DUtils │ │ ├── Random.cpp │ │ └── Timestamp.cpp └── line_descriptor │ ├── CMakeLists.txt │ ├── README.md │ ├── build │ ├── CMakeCache.txt │ ├── CMakeFiles │ │ ├── 3.5.1 │ │ │ ├── CMakeCCompiler.cmake │ │ │ ├── CMakeCXXCompiler.cmake │ │ │ ├── CMakeDetermineCompilerABI_C.bin │ │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ │ ├── CMakeSystem.cmake │ │ │ ├── CompilerIdC │ │ │ │ ├── CMakeCCompilerId.c │ │ │ │ └── a.out │ │ │ └── CompilerIdCXX │ │ │ │ ├── CMakeCXXCompilerId.cpp │ │ │ │ └── a.out │ │ ├── CMakeDirectoryInformation.cmake │ │ ├── CMakeOutput.log │ │ ├── CMakeRuleHashes.txt │ │ ├── Makefile.cmake │ │ ├── Makefile2 │ │ ├── TargetDirectories.txt │ │ ├── cmake.check_cache │ │ ├── feature_tests.bin │ │ ├── feature_tests.c │ │ ├── feature_tests.cxx │ │ ├── linedesc.dir │ │ │ ├── CMakeFiles │ │ │ │ └── 3.5.1 │ │ │ │ │ └── CompilerIdCXX │ │ │ │ │ └── CMakeCXXCompilerId.cpp.o │ │ │ ├── CXX.includecache │ │ │ ├── DependInfo.cmake │ │ │ ├── build.make │ │ │ ├── cmake_clean.cmake │ │ │ ├── depend.internal │ │ │ ├── depend.make │ │ │ ├── flags.make │ │ │ ├── link.txt │ │ │ ├── progress.make │ │ │ └── src │ │ │ │ ├── LSDDetector_custom.cpp.o │ │ │ │ ├── binary_descriptor_custom.cpp.o │ │ │ │ ├── binary_descriptor_matcher.cpp.o │ │ │ │ └── draw_custom.cpp.o │ │ ├── linedesc_includes.dir │ │ │ ├── DependInfo.cmake │ │ │ ├── build.make │ │ │ ├── cmake_clean.cmake │ │ │ └── progress.make │ │ └── progress.marks │ ├── Makefile │ └── cmake_install.cmake │ ├── include │ ├── line_descriptor │ │ └── descriptor_custom.hpp │ └── line_descriptor_custom.hpp │ ├── lib │ └── liblinedesc.so │ └── src │ ├── LSDDetector_custom.cpp │ ├── binary_descriptor_custom.cpp │ ├── binary_descriptor_matcher.cpp │ ├── bitarray_custom.hpp │ ├── bitops_custom.hpp │ ├── draw_custom.cpp │ ├── precomp_custom.hpp │ └── types_custom.hpp ├── CMakeLists.txt ├── LICENSE ├── README.md ├── app └── plslam_dataset.cpp ├── build.sh ├── cmake_modules ├── FindCSparse.cmake └── FindG2O.cmake ├── config ├── asl │ └── gt-ass │ │ ├── mh_01 │ │ ├── associations.txt │ │ └── groundtruth.txt │ │ ├── mh_02 │ │ ├── associations.txt │ │ └── groundtruth.txt │ │ ├── mh_03 │ │ ├── associations.txt │ │ └── groundtruth.txt │ │ ├── mh_04 │ │ ├── associations.txt │ │ └── groundtruth.txt │ │ ├── mh_05 │ │ ├── associations.txt │ │ └── groundtruth.txt │ │ ├── v1_01 │ │ ├── associations.txt │ │ └── groundtruth.txt │ │ ├── v1_02 │ │ ├── associations.txt │ │ └── groundtruth.txt │ │ ├── v1_03 │ │ ├── associations.txt │ │ └── groundtruth.txt │ │ ├── v2_01 │ │ ├── associations.txt │ │ └── groundtruth.txt │ │ ├── v2_02 │ │ ├── associations.txt │ │ └── groundtruth.txt │ │ └── v2_03 │ │ ├── associations.txt │ │ └── groundtruth.txt ├── config │ ├── config.yaml │ ├── config_euroc.yaml │ ├── config_fast.yaml │ ├── config_full.yaml │ ├── config_kitti.yaml │ └── config_reduced.yaml ├── dataset_params │ ├── asusxtion_params.yaml │ ├── dataset_params.yaml │ ├── euroc_params.yaml │ ├── kitti00-02.yaml │ ├── kitti03.yaml │ ├── kitti04-10.yaml │ └── perceptin_params.yaml ├── scene_config.ini └── scene_config_indoor.ini ├── g2o_types ├── g2o_types.cpp └── g2o_types.h ├── include ├── keyFrame.h ├── mapFeatures.h ├── mapHandler.h ├── slamConfig.h └── slamScene.h ├── include2 ├── auxiliar.h ├── config.h ├── dataset.h ├── gridStructure.h ├── lineIterator.h ├── matching.h ├── pinholeStereoCamera.h ├── sceneRepresentation.h ├── stereoFeatures.h ├── stereoFrame.h ├── stereoFrameHandler.h └── timer.h ├── lib └── libplslam.so ├── result ├── plucker.png └── xyz.png ├── src ├── keyFrame.cpp ├── mapFeatures.cpp ├── mapHandler.cpp ├── slamConfig.cpp └── slamScene.cpp ├── src2 ├── auxiliar.cpp ├── config.cpp ├── dataset.cpp ├── featureMatching.cpp ├── gridStructure.cpp ├── lineIterator.cpp ├── matching.cpp ├── pinholeStereoCamera.cpp ├── sceneRepresentation.cpp ├── stereoFeatures.cpp ├── stereoFrame.cpp ├── stereoFrameHandler.cpp └── timer.cpp └── vocabulary └── voc.tar.gz /3rdparty/DBoW2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(DBoW2 CXX) 2 | 3 | cmake_minimum_required(VERSION 2.7) 4 | set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries?") 5 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3 -mtune=native -march=native") 6 | 7 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 8 | set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE) 9 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") 10 | endif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 11 | message(STATUS "Build type: " ${CMAKE_BUILD_TYPE}) 12 | 13 | find_package(OpenCV 3 REQUIRED) 14 | 15 | set(LIBRARY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/lib") 16 | 17 | include_directories(include include/DBoW2 include/DUtils ${OpenCV_INCLUDE_DIRS}) 18 | 19 | set(SRC_FILES 20 | src/DBoW2/BowVector.cpp 21 | src/DBoW2/FeatureVector.cpp 22 | src/DBoW2/FORB.cpp 23 | src/DBoW2/QueryResults.cpp 24 | src/DBoW2/ScoringObject.cpp 25 | 26 | src/DUtils/Random.cpp 27 | src/DUtils/Timestamp.cpp 28 | ) 29 | 30 | add_library(DBoW2 SHARED ${SRC_FILES}) 31 | target_link_libraries(DBoW2 ${OpenCV_LIBS}) 32 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/LICENSE.txt: -------------------------------------------------------------------------------- 1 | DBoW2: bag-of-words library for C++ with generic descriptors 2 | 3 | Copyright (c) 2015 Dorian Galvez-Lopez. http://doriangalvez.com 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions 8 | are met: 9 | 1. Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 2. Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 3. The original author of the work must be notified of any 15 | redistribution of source code or in binary form. 16 | 4. Neither the name of copyright holders nor the names of its 17 | contributors may be used to endorse or promote products derived 18 | from this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS 24 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | POSSIBILITY OF SUCH DAMAGE. 31 | 32 | If you use it in an academic work, please cite: 33 | 34 | @ARTICLE{GalvezTRO12, 35 | author={G\'alvez-L\'opez, Dorian and Tard\'os, J. D.}, 36 | journal={IEEE Transactions on Robotics}, 37 | title={Bags of Binary Words for Fast Place Recognition in Image Sequences}, 38 | year={2012}, 39 | month={October}, 40 | volume={28}, 41 | number={5}, 42 | pages={1188--1197}, 43 | doi={10.1109/TRO.2012.2197158}, 44 | ISSN={1552-3098} 45 | } 46 | 47 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/README.md: -------------------------------------------------------------------------------- 1 | DBoW2 2 | ===== 3 | 4 | DBoW2 is an improved version of the DBow library, an open source C++ library for indexing and converting images into a bag-of-word representation. It implements a hierarchical tree for approximating nearest neighbours in the image feature space and creating a visual vocabulary. DBoW2 also implements an image database with inverted and direct files to index images and enabling quick queries and feature comparisons. The main differences with the previous DBow library are: 5 | 6 | * DBoW2 classes are templated, so it can work with any type of descriptor. 7 | * DBoW2 is shipped with classes to directly work with ORB or BRIEF descriptors. 8 | * DBoW2 adds a direct file to the image database to do fast feature comparison. This is used by DLoopDetector. 9 | * DBoW2 does not use a binary format any longer. On the other hand, it uses the OpenCV storage system to save vocabularies and databases. This means that these files can be stored as plain text in YAML format, making compatibility easier, or compressed in gunzip format (.gz) to reduce disk usage. 10 | * Some pieces of code have been rewritten to optimize speed. The interface of DBoW2 has been simplified. 11 | * For performance reasons, DBoW2 does not support stop words. 12 | 13 | DBoW2 requires OpenCV and the `Boost::dynamic_bitset` class in order to use the BRIEF version. 14 | 15 | DBoW2, along with DLoopDetector, has been tested on several real datasets, yielding an execution time of 3 ms to convert the BRIEF features of an image into a bag-of-words vector and 5 ms to look for image matches in a database with more than 19000 images. 16 | 17 | ## Citing 18 | 19 | If you use this software in an academic work, please cite: 20 | 21 | @ARTICLE{GalvezTRO12, 22 | author={G\'alvez-L\'opez, Dorian and Tard\'os, J. D.}, 23 | journal={IEEE Transactions on Robotics}, 24 | title={Bags of Binary Words for Fast Place Recognition in Image Sequences}, 25 | year={2012}, 26 | month={October}, 27 | volume={28}, 28 | number={5}, 29 | pages={1188--1197}, 30 | doi={10.1109/TRO.2012.2197158}, 31 | ISSN={1552-3098} 32 | } 33 | } 34 | 35 | ## Installation notes 36 | 37 | DBoW2 requires [DLib](https://github.com/dorian3d/DLib), which is automatically installed if it cannot be found in the system. You can also find it in [my repository](https://github.com/dorian3d/DLib). 38 | 39 | DBoW2 requires OpenCV and the `Boost::dynamic_bitset` class in order to use the BRIEF version. You can install Boost by typing: 40 | 41 | $ sudo apt-get install libboost-dev 42 | 43 | 44 | ## Usage notes 45 | 46 | ### Weighting and Scoring 47 | 48 | DBoW2 implements the same weighting and scoring mechanisms as DBow. Check them here. The only difference is that DBoW2 scales all the scores to [0..1], so that the scaling flag is not used any longer. 49 | 50 | ### Save & Load 51 | 52 | All vocabularies and databases can be saved to and load from disk with the save and load member functions. When a database is saved, the vocabulary it is associated with is also embedded in the file, so that vocabulary and database files are completely independent. 53 | 54 | You can also add the vocabulary or database data to any file opened with a `cv::FileStorage` structure. 55 | 56 | You can save the vocabulary or the database with any file extension. If you use .gz, the file is automatically compressed (OpenCV behaviour). 57 | 58 | ## Implementation notes 59 | 60 | ### Template parameters 61 | 62 | DBoW2 has two main classes: `TemplatedVocabulary` and `TemplatedDatabase`. These implement the visual vocabulary to convert images into bag-of-words vectors and the database to index images. These classes are templated: 63 | 64 | template 65 | class TemplatedVocabulary 66 | { 67 | ... 68 | }; 69 | 70 | template 71 | class TemplatedDatabase 72 | { 73 | ... 74 | }; 75 | 76 | Two classes must be provided: `TDescriptor` is the data type of a single descriptor vector, and `F`, a class with the functions to manipulate descriptors, derived from `FClass`. 77 | 78 | For example, to work with ORB descriptors, `TDescriptor` is defined as `cv::Mat` (of type `CV_8UC1`), which is a single row that contains 32 8-bit values. When features are extracted from an image, a `std::vector` must be obtained. In the case of BRIEF, `TDescriptor` is defined as `boost::dynamic_bitset<>`. 79 | 80 | The `F` parameter is the name of a class that implements the functions defined in `FClass`. These functions get `TDescriptor` data and compute some result. Classes to deal with ORB and BRIEF descriptors are already included in DBoW2. (`FORB`, `FBrief`). 81 | 82 | ### Predefined Vocabularies and Databases 83 | 84 | To make it easier to use, DBoW2 defines two kinds of vocabularies and databases: `OrbVocabulary`, `OrbDatabase`, `BriefVocabulary`, `BriefDatabase`. Please, check the demo application to see how they are created and used. 85 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/3.5.1/CMakeCXXCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_CXX_COMPILER "/usr/local/bin/c++") 2 | set(CMAKE_CXX_COMPILER_ARG1 "") 3 | set(CMAKE_CXX_COMPILER_ID "GNU") 4 | set(CMAKE_CXX_COMPILER_VERSION "5.3.0") 5 | set(CMAKE_CXX_COMPILER_WRAPPER "") 6 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "98") 7 | set(CMAKE_CXX_COMPILE_FEATURES "cxx_template_template_parameters;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") 8 | set(CMAKE_CXX98_COMPILE_FEATURES "cxx_template_template_parameters") 9 | set(CMAKE_CXX11_COMPILE_FEATURES "cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") 10 | set(CMAKE_CXX14_COMPILE_FEATURES "cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") 11 | 12 | set(CMAKE_CXX_PLATFORM_ID "Linux") 13 | set(CMAKE_CXX_SIMULATE_ID "") 14 | set(CMAKE_CXX_SIMULATE_VERSION "") 15 | 16 | set(CMAKE_AR "/usr/bin/ar") 17 | set(CMAKE_RANLIB "/usr/bin/ranlib") 18 | set(CMAKE_LINKER "/usr/bin/ld") 19 | set(CMAKE_COMPILER_IS_GNUCXX 1) 20 | set(CMAKE_CXX_COMPILER_LOADED 1) 21 | set(CMAKE_CXX_COMPILER_WORKS TRUE) 22 | set(CMAKE_CXX_ABI_COMPILED TRUE) 23 | set(CMAKE_COMPILER_IS_MINGW ) 24 | set(CMAKE_COMPILER_IS_CYGWIN ) 25 | if(CMAKE_COMPILER_IS_CYGWIN) 26 | set(CYGWIN 1) 27 | set(UNIX 1) 28 | endif() 29 | 30 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") 31 | 32 | if(CMAKE_COMPILER_IS_MINGW) 33 | set(MINGW 1) 34 | endif() 35 | set(CMAKE_CXX_COMPILER_ID_RUN 1) 36 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) 37 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP) 38 | set(CMAKE_CXX_LINKER_PREFERENCE 30) 39 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) 40 | 41 | # Save compiler ABI information. 42 | set(CMAKE_CXX_SIZEOF_DATA_PTR "8") 43 | set(CMAKE_CXX_COMPILER_ABI "ELF") 44 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 45 | 46 | if(CMAKE_CXX_SIZEOF_DATA_PTR) 47 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") 48 | endif() 49 | 50 | if(CMAKE_CXX_COMPILER_ABI) 51 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") 52 | endif() 53 | 54 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE) 55 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 56 | endif() 57 | 58 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") 59 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) 60 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") 61 | endif() 62 | 63 | 64 | 65 | 66 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;c") 67 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/local/lib/gcc/x86_64-unknown-linux-gnu/5.3.0;/usr/local/lib64;/lib/x86_64-linux-gnu;/lib64;/usr/lib/x86_64-linux-gnu;/usr/local/lib") 68 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") 69 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/DBoW2/build/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/3.5.1/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_HOST_SYSTEM "Linux-4.12.9-041209-generic") 2 | set(CMAKE_HOST_SYSTEM_NAME "Linux") 3 | set(CMAKE_HOST_SYSTEM_VERSION "4.12.9-041209-generic") 4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") 5 | 6 | 7 | 8 | set(CMAKE_SYSTEM "Linux-4.12.9-041209-generic") 9 | set(CMAKE_SYSTEM_NAME "Linux") 10 | set(CMAKE_SYSTEM_VERSION "4.12.9-041209-generic") 11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64") 12 | 13 | set(CMAKE_CROSSCOMPILING "FALSE") 14 | 15 | set(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/3.5.1/CompilerIdCXX/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/DBoW2/build/CMakeFiles/3.5.1/CompilerIdCXX/a.out -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/hc/桌面/pl-slam-master/3rdparty/DBoW2") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/hc/桌面/pl-slam-master/3rdparty/DBoW2/build") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/home/hc/桌面/pl-slam-master/3rdparty/DBoW2/src/DBoW2/BowVector.cpp" "/home/hc/桌面/pl-slam-master/3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DBoW2/BowVector.cpp.o" 8 | "/home/hc/桌面/pl-slam-master/3rdparty/DBoW2/src/DBoW2/FORB.cpp" "/home/hc/桌面/pl-slam-master/3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DBoW2/FORB.cpp.o" 9 | "/home/hc/桌面/pl-slam-master/3rdparty/DBoW2/src/DBoW2/FeatureVector.cpp" "/home/hc/桌面/pl-slam-master/3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DBoW2/FeatureVector.cpp.o" 10 | "/home/hc/桌面/pl-slam-master/3rdparty/DBoW2/src/DBoW2/QueryResults.cpp" "/home/hc/桌面/pl-slam-master/3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DBoW2/QueryResults.cpp.o" 11 | "/home/hc/桌面/pl-slam-master/3rdparty/DBoW2/src/DBoW2/ScoringObject.cpp" "/home/hc/桌面/pl-slam-master/3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DBoW2/ScoringObject.cpp.o" 12 | "/home/hc/桌面/pl-slam-master/3rdparty/DBoW2/src/DUtils/Random.cpp" "/home/hc/桌面/pl-slam-master/3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DUtils/Random.cpp.o" 13 | "/home/hc/桌面/pl-slam-master/3rdparty/DBoW2/src/DUtils/Timestamp.cpp" "/home/hc/桌面/pl-slam-master/3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DUtils/Timestamp.cpp.o" 14 | ) 15 | set(CMAKE_CXX_COMPILER_ID "GNU") 16 | 17 | # The include file search paths: 18 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 19 | "../include" 20 | "../include/DBoW2" 21 | "../include/DUtils" 22 | "/opt/ros/kinetic/include/opencv-3.3.1-dev" 23 | "/opt/ros/kinetic/include/opencv-3.3.1-dev/opencv" 24 | ) 25 | 26 | # Targets to which this target links. 27 | set(CMAKE_TARGET_LINKED_INFO_FILES 28 | ) 29 | 30 | # Fortran module output directory. 31 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 32 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/DBoW2.dir/src/DBoW2/BowVector.cpp.o" 3 | "CMakeFiles/DBoW2.dir/src/DBoW2/FeatureVector.cpp.o" 4 | "CMakeFiles/DBoW2.dir/src/DBoW2/FORB.cpp.o" 5 | "CMakeFiles/DBoW2.dir/src/DBoW2/QueryResults.cpp.o" 6 | "CMakeFiles/DBoW2.dir/src/DBoW2/ScoringObject.cpp.o" 7 | "CMakeFiles/DBoW2.dir/src/DUtils/Random.cpp.o" 8 | "CMakeFiles/DBoW2.dir/src/DUtils/Timestamp.cpp.o" 9 | "../lib/libDBoW2.pdb" 10 | "../lib/libDBoW2.so" 11 | ) 12 | 13 | # Per-language clean rules from dependency scanning. 14 | foreach(lang CXX) 15 | include(CMakeFiles/DBoW2.dir/cmake_clean_${lang}.cmake OPTIONAL) 16 | endforeach() 17 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # compile CXX with /usr/local/bin/c++ 5 | CXX_FLAGS = -std=c++11 -O3 -mtune=native -march=native -O3 -DNDEBUG -fPIC 6 | 7 | CXX_DEFINES = -DDBoW2_EXPORTS 8 | 9 | CXX_INCLUDES = -I/home/hc/桌面/pl-slam-master/3rdparty/DBoW2/include -I/home/hc/桌面/pl-slam-master/3rdparty/DBoW2/include/DBoW2 -I/home/hc/桌面/pl-slam-master/3rdparty/DBoW2/include/DUtils -isystem /opt/ros/kinetic/include/opencv-3.3.1-dev -isystem /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv 10 | 11 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/local/bin/c++ -fPIC -std=c++11 -O3 -mtune=native -march=native -O3 -DNDEBUG -shared -Wl,-soname,libDBoW2.so -o ../lib/libDBoW2.so CMakeFiles/DBoW2.dir/src/DBoW2/BowVector.cpp.o CMakeFiles/DBoW2.dir/src/DBoW2/FeatureVector.cpp.o CMakeFiles/DBoW2.dir/src/DBoW2/FORB.cpp.o CMakeFiles/DBoW2.dir/src/DBoW2/QueryResults.cpp.o CMakeFiles/DBoW2.dir/src/DBoW2/ScoringObject.cpp.o CMakeFiles/DBoW2.dir/src/DUtils/Random.cpp.o CMakeFiles/DBoW2.dir/src/DUtils/Timestamp.cpp.o /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_stitching3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_superres3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_videostab3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_aruco3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_bgsegm3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_bioinspired3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_ccalib3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_cvv3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_dpm3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_face3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_fuzzy3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_hdf3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_img_hash3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_line_descriptor3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_optflow3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_reg3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_rgbd3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_saliency3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_stereo3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_structured_light3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_surface_matching3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_tracking3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_xfeatures2d3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_ximgproc3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_xobjdetect3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_xphoto3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_shape3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_photo3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_datasets3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_plot3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_text3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_dnn3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_ml3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_video3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_calib3d3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_features2d3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_highgui3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_videoio3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_viz3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_phase_unwrapping3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_flann3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_imgcodecs3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_objdetect3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_imgproc3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_core3.so.3.3.1 -Wl,-rpath,/opt/ros/kinetic/lib/x86_64-linux-gnu 2 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 1 2 | CMAKE_PROGRESS_2 = 2 3 | CMAKE_PROGRESS_3 = 3 4 | CMAKE_PROGRESS_4 = 4 5 | CMAKE_PROGRESS_5 = 5 6 | CMAKE_PROGRESS_6 = 6 7 | CMAKE_PROGRESS_7 = 7 8 | CMAKE_PROGRESS_8 = 8 9 | 10 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DBoW2/BowVector.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DBoW2/BowVector.cpp.o -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DBoW2/FORB.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DBoW2/FORB.cpp.o -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DBoW2/FeatureVector.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DBoW2/FeatureVector.cpp.o -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DBoW2/QueryResults.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DBoW2/QueryResults.cpp.o -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DBoW2/ScoringObject.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DBoW2/ScoringObject.cpp.o -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DUtils/Random.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DUtils/Random.cpp.o -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DUtils/Timestamp.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir/src/DUtils/Timestamp.cpp.o -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/Makefile.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # The generator used is: 5 | set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") 6 | 7 | # The top level Makefile was generated from the following files: 8 | set(CMAKE_MAKEFILE_DEPENDS 9 | "CMakeCache.txt" 10 | "../CMakeLists.txt" 11 | "CMakeFiles/3.5.1/CMakeCXXCompiler.cmake" 12 | "CMakeFiles/3.5.1/CMakeSystem.cmake" 13 | "/opt/ros/kinetic/share/OpenCV-3.3.1-dev/OpenCVConfig-version.cmake" 14 | "/opt/ros/kinetic/share/OpenCV-3.3.1-dev/OpenCVConfig.cmake" 15 | "/opt/ros/kinetic/share/OpenCV-3.3.1-dev/OpenCVModules-release.cmake" 16 | "/opt/ros/kinetic/share/OpenCV-3.3.1-dev/OpenCVModules.cmake" 17 | "/usr/share/cmake-3.5/Modules/CMakeCXXInformation.cmake" 18 | "/usr/share/cmake-3.5/Modules/CMakeCommonLanguageInclude.cmake" 19 | "/usr/share/cmake-3.5/Modules/CMakeGenericSystem.cmake" 20 | "/usr/share/cmake-3.5/Modules/CMakeLanguageInformation.cmake" 21 | "/usr/share/cmake-3.5/Modules/CMakeParseArguments.cmake" 22 | "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInformation.cmake" 23 | "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInitialize.cmake" 24 | "/usr/share/cmake-3.5/Modules/Compiler/GNU-CXX.cmake" 25 | "/usr/share/cmake-3.5/Modules/Compiler/GNU.cmake" 26 | "/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake" 27 | "/usr/share/cmake-3.5/Modules/FindPackageMessage.cmake" 28 | "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-CXX.cmake" 29 | "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU.cmake" 30 | "/usr/share/cmake-3.5/Modules/Platform/Linux.cmake" 31 | "/usr/share/cmake-3.5/Modules/Platform/UnixPaths.cmake" 32 | ) 33 | 34 | # The corresponding makefile is: 35 | set(CMAKE_MAKEFILE_OUTPUTS 36 | "Makefile" 37 | "CMakeFiles/cmake.check_cache" 38 | ) 39 | 40 | # Byproducts of CMake generate step: 41 | set(CMAKE_MAKEFILE_PRODUCTS 42 | "CMakeFiles/CMakeDirectoryInformation.cmake" 43 | ) 44 | 45 | # Dependency information for all targets: 46 | set(CMAKE_DEPEND_INFO_FILES 47 | "CMakeFiles/DBoW2.dir/DependInfo.cmake" 48 | ) 49 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/Makefile2: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # The main recursive all target 10 | all: 11 | 12 | .PHONY : all 13 | 14 | # The main recursive preinstall target 15 | preinstall: 16 | 17 | .PHONY : preinstall 18 | 19 | #============================================================================= 20 | # Special targets provided by cmake. 21 | 22 | # Disable implicit rules so canonical targets will work. 23 | .SUFFIXES: 24 | 25 | 26 | # Remove some rules from gmake that .SUFFIXES does not remove. 27 | SUFFIXES = 28 | 29 | .SUFFIXES: .hpux_make_needs_suffix_list 30 | 31 | 32 | # Suppress display of executed commands. 33 | $(VERBOSE).SILENT: 34 | 35 | 36 | # A target that is always out of date. 37 | cmake_force: 38 | 39 | .PHONY : cmake_force 40 | 41 | #============================================================================= 42 | # Set environment variables for the build. 43 | 44 | # The shell in which to execute make rules. 45 | SHELL = /bin/sh 46 | 47 | # The CMake executable. 48 | CMAKE_COMMAND = /usr/bin/cmake 49 | 50 | # The command to remove a file. 51 | RM = /usr/bin/cmake -E remove -f 52 | 53 | # Escaping for special characters. 54 | EQUALS = = 55 | 56 | # The top-level source directory on which CMake was run. 57 | CMAKE_SOURCE_DIR = /home/hc/桌面/pl-slam-master/3rdparty/DBoW2 58 | 59 | # The top-level build directory on which CMake was run. 60 | CMAKE_BINARY_DIR = /home/hc/桌面/pl-slam-master/3rdparty/DBoW2/build 61 | 62 | #============================================================================= 63 | # Target rules for target CMakeFiles/DBoW2.dir 64 | 65 | # All Build rule for target. 66 | CMakeFiles/DBoW2.dir/all: 67 | $(MAKE) -f CMakeFiles/DBoW2.dir/build.make CMakeFiles/DBoW2.dir/depend 68 | $(MAKE) -f CMakeFiles/DBoW2.dir/build.make CMakeFiles/DBoW2.dir/build 69 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/hc/桌面/pl-slam-master/3rdparty/DBoW2/build/CMakeFiles --progress-num=1,2,3,4,5,6,7,8 "Built target DBoW2" 70 | .PHONY : CMakeFiles/DBoW2.dir/all 71 | 72 | # Include target in all. 73 | all: CMakeFiles/DBoW2.dir/all 74 | 75 | .PHONY : all 76 | 77 | # Build rule for subdir invocation for target. 78 | CMakeFiles/DBoW2.dir/rule: cmake_check_build_system 79 | $(CMAKE_COMMAND) -E cmake_progress_start /home/hc/桌面/pl-slam-master/3rdparty/DBoW2/build/CMakeFiles 8 80 | $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/DBoW2.dir/all 81 | $(CMAKE_COMMAND) -E cmake_progress_start /home/hc/桌面/pl-slam-master/3rdparty/DBoW2/build/CMakeFiles 0 82 | .PHONY : CMakeFiles/DBoW2.dir/rule 83 | 84 | # Convenience name for target. 85 | DBoW2: CMakeFiles/DBoW2.dir/rule 86 | 87 | .PHONY : DBoW2 88 | 89 | # clean rule for target. 90 | CMakeFiles/DBoW2.dir/clean: 91 | $(MAKE) -f CMakeFiles/DBoW2.dir/build.make CMakeFiles/DBoW2.dir/clean 92 | .PHONY : CMakeFiles/DBoW2.dir/clean 93 | 94 | # clean rule for target. 95 | clean: CMakeFiles/DBoW2.dir/clean 96 | 97 | .PHONY : clean 98 | 99 | #============================================================================= 100 | # Special targets to cleanup operation of make. 101 | 102 | # Special rule to run CMake to check the build system integrity. 103 | # No rule that depends on this can have commands that come from listfiles 104 | # because they might be regenerated. 105 | cmake_check_build_system: 106 | $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 107 | .PHONY : cmake_check_build_system 108 | 109 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/TargetDirectories.txt: -------------------------------------------------------------------------------- 1 | /home/hc/桌面/pl-slam-master/3rdparty/DBoW2/build/CMakeFiles/edit_cache.dir 2 | /home/hc/桌面/pl-slam-master/3rdparty/DBoW2/build/CMakeFiles/DBoW2.dir 3 | /home/hc/桌面/pl-slam-master/3rdparty/DBoW2/build/CMakeFiles/rebuild_cache.dir 4 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/feature_tests.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/DBoW2/build/CMakeFiles/feature_tests.bin -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/build/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /home/hc/桌面/pl-slam-master/3rdparty/DBoW2 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "Release") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | if(CMAKE_INSTALL_COMPONENT) 36 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") 37 | else() 38 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") 39 | endif() 40 | 41 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT 42 | "${CMAKE_INSTALL_MANIFEST_FILES}") 43 | file(WRITE "/home/hc/桌面/pl-slam-master/3rdparty/DBoW2/build/${CMAKE_INSTALL_MANIFEST}" 44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}") 45 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/include/DBoW2/BowVector.h: -------------------------------------------------------------------------------- 1 | /** 2 | * File: BowVector.h 3 | * Date: March 2011 4 | * Author: Dorian Galvez-Lopez 5 | * Description: bag of words vector 6 | * License: see the LICENSE.txt file 7 | * 8 | */ 9 | 10 | #ifndef __D_T_BOW_VECTOR__ 11 | #define __D_T_BOW_VECTOR__ 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | namespace DBoW2 { 18 | 19 | /// Id of words 20 | typedef unsigned int WordId; 21 | 22 | /// Value of a word 23 | typedef double WordValue; 24 | 25 | /// Id of nodes in the vocabulary treee 26 | typedef unsigned int NodeId; 27 | 28 | /// L-norms for normalization 29 | enum LNorm 30 | { 31 | L1, 32 | L2 33 | }; 34 | 35 | /// Weighting type 36 | enum WeightingType 37 | { 38 | TF_IDF, 39 | TF, 40 | IDF, 41 | BINARY 42 | }; 43 | 44 | /// Scoring type 45 | enum ScoringType 46 | { 47 | L1_NORM, 48 | L2_NORM, 49 | CHI_SQUARE, 50 | KL, 51 | BHATTACHARYYA, 52 | DOT_PRODUCT 53 | }; 54 | 55 | /// Vector of words to represent images 56 | class BowVector: 57 | public std::map 58 | { 59 | public: 60 | 61 | /** 62 | * Constructor 63 | */ 64 | BowVector(void); 65 | 66 | /** 67 | * Destructor 68 | */ 69 | ~BowVector(void); 70 | 71 | /** 72 | * Adds a value to a word value existing in the vector, or creates a new 73 | * word with the given value 74 | * @param id word id to look for 75 | * @param v value to create the word with, or to add to existing word 76 | */ 77 | void addWeight(WordId id, WordValue v); 78 | 79 | /** 80 | * Adds a word with a value to the vector only if this does not exist yet 81 | * @param id word id to look for 82 | * @param v value to give to the word if this does not exist 83 | */ 84 | void addIfNotExist(WordId id, WordValue v); 85 | 86 | /** 87 | * L1-Normalizes the values in the vector 88 | * @param norm_type norm used 89 | */ 90 | void normalize(LNorm norm_type); 91 | 92 | /** 93 | * Prints the content of the bow vector 94 | * @param out stream 95 | * @param v 96 | */ 97 | friend std::ostream& operator<<(std::ostream &out, const BowVector &v); 98 | 99 | /** 100 | * Saves the bow vector as a vector in a matlab file 101 | * @param filename 102 | * @param W number of words in the vocabulary 103 | */ 104 | void saveM(const std::string &filename, size_t W) const; 105 | }; 106 | 107 | } // namespace DBoW2 108 | 109 | #endif 110 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/include/DBoW2/DBoW2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: DBoW2.h 3 | * Date: November 2011 4 | * Author: Dorian Galvez-Lopez 5 | * Description: Generic include file for the DBoW2 classes and 6 | * the specialized vocabularies and databases 7 | * License: see the LICENSE.txt file 8 | * 9 | */ 10 | 11 | /*! \mainpage DBoW2 Library 12 | * 13 | * DBoW2 library for C++: 14 | * Bag-of-word image database for image retrieval. 15 | * 16 | * Written by Dorian Galvez-Lopez, 17 | * University of Zaragoza 18 | * 19 | * Check my website to obtain updates: http://doriangalvez.com 20 | * 21 | * \section requirements Requirements 22 | * This library requires the DUtils, DUtilsCV, DVision and OpenCV libraries, 23 | * as well as the boost::dynamic_bitset class. 24 | * 25 | * \section citation Citation 26 | * If you use this software in academic works, please cite: 27 |
28 |    @@ARTICLE{GalvezTRO12,
29 |     author={Galvez-Lopez, Dorian and Tardos, J. D.}, 
30 |     journal={IEEE Transactions on Robotics},
31 |     title={Bags of Binary Words for Fast Place Recognition in Image Sequences},
32 |     year={2012},
33 |     month={October},
34 |     volume={28},
35 |     number={5},
36 |     pages={1188--1197},
37 |     doi={10.1109/TRO.2012.2197158},
38 |     ISSN={1552-3098}
39 |   }
40 |  
41 | * 42 | */ 43 | 44 | #ifndef __D_T_DBOW2__ 45 | #define __D_T_DBOW2__ 46 | 47 | /// Includes all the data structures to manage vocabularies and image databases 48 | namespace DBoW2 49 | { 50 | } 51 | 52 | #include "TemplatedVocabulary.h" 53 | #include "TemplatedDatabase.h" 54 | #include "BowVector.h" 55 | #include "FeatureVector.h" 56 | #include "QueryResults.h" 57 | #include "FBrief.h" 58 | #include "FORB.h" 59 | 60 | /// ORB Vocabulary 61 | typedef DBoW2::TemplatedVocabulary 62 | OrbVocabulary; 63 | 64 | /// FORB Database 65 | typedef DBoW2::TemplatedDatabase 66 | OrbDatabase; 67 | 68 | /// BRIEF Vocabulary 69 | typedef DBoW2::TemplatedVocabulary 70 | BriefVocabulary; 71 | 72 | /// BRIEF Database 73 | typedef DBoW2::TemplatedDatabase 74 | BriefDatabase; 75 | 76 | #endif 77 | 78 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/include/DBoW2/FBrief.h: -------------------------------------------------------------------------------- 1 | /** 2 | * File: FBrief.h 3 | * Date: November 2011 4 | * Author: Dorian Galvez-Lopez 5 | * Description: functions for BRIEF descriptors 6 | * License: see the LICENSE.txt file 7 | * 8 | */ 9 | 10 | #ifndef __D_T_F_BRIEF__ 11 | #define __D_T_F_BRIEF__ 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include "FClass.h" 18 | #include 19 | 20 | namespace DBoW2 { 21 | 22 | /// Functions to manipulate BRIEF descriptors 23 | class FBrief: protected FClass 24 | { 25 | public: 26 | 27 | typedef DVision::BRIEF::bitset TDescriptor; 28 | typedef const TDescriptor *pDescriptor; 29 | 30 | /** 31 | * Calculates the mean value of a set of descriptors 32 | * @param descriptors 33 | * @param mean mean descriptor 34 | */ 35 | static void meanValue(const std::vector &descriptors, 36 | TDescriptor &mean); 37 | 38 | /** 39 | * Calculates the distance between two descriptors 40 | * @param a 41 | * @param b 42 | * @return distance 43 | */ 44 | static double distance(const TDescriptor &a, const TDescriptor &b); 45 | 46 | /** 47 | * Returns a string version of the descriptor 48 | * @param a descriptor 49 | * @return string version 50 | */ 51 | static std::string toString(const TDescriptor &a); 52 | 53 | /** 54 | * Returns a descriptor from a string 55 | * @param a descriptor 56 | * @param s string version 57 | */ 58 | static void fromString(TDescriptor &a, const std::string &s); 59 | 60 | /** 61 | * Returns a mat with the descriptors in float format 62 | * @param descriptors 63 | * @param mat (out) NxL 32F matrix 64 | */ 65 | static void toMat32F(const std::vector &descriptors, 66 | cv::Mat &mat); 67 | 68 | }; 69 | 70 | } // namespace DBoW2 71 | 72 | #endif 73 | 74 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/include/DBoW2/FClass.h: -------------------------------------------------------------------------------- 1 | /** 2 | * File: FClass.h 3 | * Date: November 2011 4 | * Author: Dorian Galvez-Lopez 5 | * Description: generic FClass to instantiate templated classes 6 | * License: see the LICENSE.txt file 7 | * 8 | */ 9 | 10 | #ifndef __D_T_FCLASS__ 11 | #define __D_T_FCLASS__ 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | namespace DBoW2 { 18 | 19 | /// Generic class to encapsulate functions to manage descriptors. 20 | /** 21 | * This class must be inherited. Derived classes can be used as the 22 | * parameter F when creating Templated structures 23 | * (TemplatedVocabulary, TemplatedDatabase, ...) 24 | */ 25 | class FClass 26 | { 27 | class TDescriptor; 28 | typedef const TDescriptor *pDescriptor; 29 | 30 | /** 31 | * Calculates the mean value of a set of descriptors 32 | * @param descriptors 33 | * @param mean mean descriptor 34 | */ 35 | virtual void meanValue(const std::vector &descriptors, 36 | TDescriptor &mean) = 0; 37 | 38 | /** 39 | * Calculates the distance between two descriptors 40 | * @param a 41 | * @param b 42 | * @return distance 43 | */ 44 | static double distance(const TDescriptor &a, const TDescriptor &b); 45 | 46 | /** 47 | * Returns a string version of the descriptor 48 | * @param a descriptor 49 | * @return string version 50 | */ 51 | static std::string toString(const TDescriptor &a); 52 | 53 | /** 54 | * Returns a descriptor from a string 55 | * @param a descriptor 56 | * @param s string version 57 | */ 58 | static void fromString(TDescriptor &a, const std::string &s); 59 | 60 | /** 61 | * Returns a mat with the descriptors in float format 62 | * @param descriptors 63 | * @param mat (out) NxL 32F matrix 64 | */ 65 | static void toMat32F(const std::vector &descriptors, 66 | cv::Mat &mat); 67 | }; 68 | 69 | } // namespace DBoW2 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/include/DBoW2/FORB.h: -------------------------------------------------------------------------------- 1 | /** 2 | * File: FORB.h 3 | * Date: June 2012 4 | * Author: Dorian Galvez-Lopez 5 | * Description: functions for ORB descriptors 6 | * License: see the LICENSE.txt file 7 | * 8 | */ 9 | 10 | #ifndef __D_T_F_ORB__ 11 | #define __D_T_F_ORB__ 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include "FClass.h" 18 | 19 | namespace DBoW2 { 20 | 21 | /// Functions to manipulate BRIEF descriptors 22 | class FORB: protected FClass 23 | { 24 | public: 25 | 26 | /// Descriptor type 27 | typedef cv::Mat TDescriptor; // CV_8U 28 | /// Pointer to a single descriptor 29 | typedef const TDescriptor *pDescriptor; 30 | /// Descriptor length (in bytes) 31 | static const int L = 32; 32 | 33 | /** 34 | * Calculates the mean value of a set of descriptors 35 | * @param descriptors 36 | * @param mean mean descriptor 37 | */ 38 | static void meanValue(const std::vector &descriptors, 39 | TDescriptor &mean); 40 | 41 | /** 42 | * Calculates the distance between two descriptors 43 | * @param a 44 | * @param b 45 | * @return distance 46 | */ 47 | static double distance(const TDescriptor &a, const TDescriptor &b); 48 | 49 | /** 50 | * Returns a string version of the descriptor 51 | * @param a descriptor 52 | * @return string version 53 | */ 54 | static std::string toString(const TDescriptor &a); 55 | 56 | /** 57 | * Returns a descriptor from a string 58 | * @param a descriptor 59 | * @param s string version 60 | */ 61 | static void fromString(TDescriptor &a, const std::string &s); 62 | 63 | /** 64 | * Returns a mat with the descriptors in float format 65 | * @param descriptors 66 | * @param mat (out) NxL 32F matrix 67 | */ 68 | static void toMat32F(const std::vector &descriptors, 69 | cv::Mat &mat); 70 | 71 | /** 72 | * Returns a mat with the descriptors in float format 73 | * @param descriptors NxL CV_8U matrix 74 | * @param mat (out) NxL 32F matrix 75 | */ 76 | static void toMat32F(const cv::Mat &descriptors, cv::Mat &mat); 77 | 78 | /** 79 | * Returns a matrix with the descriptor in OpenCV format 80 | * @param descriptors vector of N row descriptors 81 | * @param mat (out) NxL CV_8U matrix 82 | */ 83 | static void toMat8U(const std::vector &descriptors, 84 | cv::Mat &mat); 85 | 86 | }; 87 | 88 | } // namespace DBoW2 89 | 90 | #endif 91 | 92 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/include/DBoW2/FSurf64.h: -------------------------------------------------------------------------------- 1 | /** 2 | * File: FSurf64.h 3 | * Date: November 2011 4 | * Author: Dorian Galvez-Lopez 5 | * Description: functions for Surf64 descriptors 6 | * License: see the LICENSE.txt file 7 | * 8 | */ 9 | 10 | #ifndef __D_T_F_SURF_64__ 11 | #define __D_T_F_SURF_64__ 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include "FClass.h" 18 | 19 | namespace DBoW2 { 20 | 21 | /// Functions to manipulate SURF64 descriptors 22 | class FSurf64: protected FClass 23 | { 24 | public: 25 | 26 | /// Descriptor type 27 | typedef std::vector TDescriptor; 28 | /// Pointer to a single descriptor 29 | typedef const TDescriptor *pDescriptor; 30 | /// Descriptor length 31 | static const int L = 64; 32 | 33 | /** 34 | * Returns the number of dimensions of the descriptor space 35 | * @return dimensions 36 | */ 37 | inline static int dimensions() 38 | { 39 | return L; 40 | } 41 | 42 | /** 43 | * Calculates the mean value of a set of descriptors 44 | * @param descriptors vector of pointers to descriptors 45 | * @param mean mean descriptor 46 | */ 47 | static void meanValue(const std::vector &descriptors, 48 | TDescriptor &mean); 49 | 50 | /** 51 | * Calculates the (squared) distance between two descriptors 52 | * @param a 53 | * @param b 54 | * @return (squared) distance 55 | */ 56 | static double distance(const TDescriptor &a, const TDescriptor &b); 57 | 58 | /** 59 | * Returns a string version of the descriptor 60 | * @param a descriptor 61 | * @return string version 62 | */ 63 | static std::string toString(const TDescriptor &a); 64 | 65 | /** 66 | * Returns a descriptor from a string 67 | * @param a descriptor 68 | * @param s string version 69 | */ 70 | static void fromString(TDescriptor &a, const std::string &s); 71 | 72 | /** 73 | * Returns a mat with the descriptors in float format 74 | * @param descriptors 75 | * @param mat (out) NxL 32F matrix 76 | */ 77 | static void toMat32F(const std::vector &descriptors, 78 | cv::Mat &mat); 79 | 80 | }; 81 | 82 | } // namespace DBoW2 83 | 84 | #endif 85 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/include/DBoW2/FeatureVector.h: -------------------------------------------------------------------------------- 1 | /** 2 | * File: FeatureVector.h 3 | * Date: November 2011 4 | * Author: Dorian Galvez-Lopez 5 | * Description: feature vector 6 | * License: see the LICENSE.txt file 7 | * 8 | */ 9 | 10 | #ifndef __D_T_FEATURE_VECTOR__ 11 | #define __D_T_FEATURE_VECTOR__ 12 | 13 | #include "BowVector.h" 14 | #include 15 | #include 16 | #include 17 | 18 | namespace DBoW2 { 19 | 20 | /// Vector of nodes with indexes of local features 21 | class FeatureVector: 22 | public std::map > 23 | { 24 | public: 25 | 26 | /** 27 | * Constructor 28 | */ 29 | FeatureVector(void); 30 | 31 | /** 32 | * Destructor 33 | */ 34 | ~FeatureVector(void); 35 | 36 | /** 37 | * Adds a feature to an existing node, or adds a new node with an initial 38 | * feature 39 | * @param id node id to add or to modify 40 | * @param i_feature index of feature to add to the given node 41 | */ 42 | void addFeature(NodeId id, unsigned int i_feature); 43 | 44 | /** 45 | * Sends a string versions of the feature vector through the stream 46 | * @param out stream 47 | * @param v feature vector 48 | */ 49 | friend std::ostream& operator<<(std::ostream &out, const FeatureVector &v); 50 | 51 | }; 52 | 53 | } // namespace DBoW2 54 | 55 | #endif 56 | 57 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/include/DBoW2/QueryResults.h: -------------------------------------------------------------------------------- 1 | /** 2 | * File: QueryResults.h 3 | * Date: March, November 2011 4 | * Author: Dorian Galvez-Lopez 5 | * Description: structure to store results of database queries 6 | * License: see the LICENSE.txt file 7 | * 8 | */ 9 | 10 | #ifndef __D_T_QUERY_RESULTS__ 11 | #define __D_T_QUERY_RESULTS__ 12 | 13 | #include 14 | 15 | namespace DBoW2 { 16 | 17 | /// Id of entries of the database 18 | typedef unsigned int EntryId; 19 | 20 | /// Single result of a query 21 | class Result 22 | { 23 | public: 24 | 25 | /// Entry id 26 | EntryId Id; 27 | 28 | /// Score obtained 29 | double Score; 30 | 31 | /// debug 32 | int nWords; // words in common 33 | // !!! this is filled only by Bhatt score! 34 | // (and for BCMatching, BCThresholding then) 35 | 36 | double bhatScore, chiScore; 37 | /// debug 38 | 39 | // only done by ChiSq and BCThresholding 40 | double sumCommonVi; 41 | double sumCommonWi; 42 | double expectedChiScore; 43 | /// debug 44 | 45 | /** 46 | * Empty constructors 47 | */ 48 | inline Result(){} 49 | 50 | /** 51 | * Creates a result with the given data 52 | * @param _id entry id 53 | * @param _score score 54 | */ 55 | inline Result(EntryId _id, double _score): Id(_id), Score(_score){} 56 | 57 | /** 58 | * Compares the scores of two results 59 | * @return true iff this.score < r.score 60 | */ 61 | inline bool operator<(const Result &r) const 62 | { 63 | return this->Score < r.Score; 64 | } 65 | 66 | /** 67 | * Compares the scores of two results 68 | * @return true iff this.score > r.score 69 | */ 70 | inline bool operator>(const Result &r) const 71 | { 72 | return this->Score > r.Score; 73 | } 74 | 75 | /** 76 | * Compares the entry id of the result 77 | * @return true iff this.id == id 78 | */ 79 | inline bool operator==(EntryId id) const 80 | { 81 | return this->Id == id; 82 | } 83 | 84 | /** 85 | * Compares the score of this entry with a given one 86 | * @param s score to compare with 87 | * @return true iff this score < s 88 | */ 89 | inline bool operator<(double s) const 90 | { 91 | return this->Score < s; 92 | } 93 | 94 | /** 95 | * Compares the score of this entry with a given one 96 | * @param s score to compare with 97 | * @return true iff this score > s 98 | */ 99 | inline bool operator>(double s) const 100 | { 101 | return this->Score > s; 102 | } 103 | 104 | /** 105 | * Compares the score of two results 106 | * @param a 107 | * @param b 108 | * @return true iff a.Score > b.Score 109 | */ 110 | static inline bool gt(const Result &a, const Result &b) 111 | { 112 | return a.Score > b.Score; 113 | } 114 | 115 | /** 116 | * Compares the scores of two results 117 | * @return true iff a.Score > b.Score 118 | */ 119 | inline static bool ge(const Result &a, const Result &b) 120 | { 121 | return a.Score > b.Score; 122 | } 123 | 124 | /** 125 | * Returns true iff a.Score >= b.Score 126 | * @param a 127 | * @param b 128 | * @return true iff a.Score >= b.Score 129 | */ 130 | static inline bool geq(const Result &a, const Result &b) 131 | { 132 | return a.Score >= b.Score; 133 | } 134 | 135 | /** 136 | * Returns true iff a.Score >= s 137 | * @param a 138 | * @param s 139 | * @return true iff a.Score >= s 140 | */ 141 | static inline bool geqv(const Result &a, double s) 142 | { 143 | return a.Score >= s; 144 | } 145 | 146 | 147 | /** 148 | * Returns true iff a.Id < b.Id 149 | * @param a 150 | * @param b 151 | * @return true iff a.Id < b.Id 152 | */ 153 | static inline bool ltId(const Result &a, const Result &b) 154 | { 155 | return a.Id < b.Id; 156 | } 157 | 158 | /** 159 | * Prints a string version of the result 160 | * @param os ostream 161 | * @param ret Result to print 162 | */ 163 | friend std::ostream & operator<<(std::ostream& os, const Result& ret ); 164 | }; 165 | 166 | /// Multiple results from a query 167 | class QueryResults: public std::vector 168 | { 169 | public: 170 | 171 | /** 172 | * Multiplies all the scores in the vector by factor 173 | * @param factor 174 | */ 175 | inline void scaleScores(double factor); 176 | 177 | /** 178 | * Prints a string version of the results 179 | * @param os ostream 180 | * @param ret QueryResults to print 181 | */ 182 | friend std::ostream & operator<<(std::ostream& os, const QueryResults& ret ); 183 | 184 | /** 185 | * Saves a matlab file with the results 186 | * @param filename 187 | */ 188 | void saveM(const std::string &filename) const; 189 | 190 | }; 191 | 192 | // -------------------------------------------------------------------------- 193 | 194 | inline void QueryResults::scaleScores(double factor) 195 | { 196 | for(QueryResults::iterator qit = begin(); qit != end(); ++qit) 197 | qit->Score *= factor; 198 | } 199 | 200 | // -------------------------------------------------------------------------- 201 | 202 | } // namespace TemplatedBoW 203 | 204 | #endif 205 | 206 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/include/DBoW2/ScoringObject.h: -------------------------------------------------------------------------------- 1 | /** 2 | * File: ScoringObject.h 3 | * Date: November 2011 4 | * Author: Dorian Galvez-Lopez 5 | * Description: functions to compute bow scores 6 | * License: see the LICENSE.txt file 7 | * 8 | */ 9 | 10 | #ifndef __D_T_SCORING_OBJECT__ 11 | #define __D_T_SCORING_OBJECT__ 12 | 13 | #include "BowVector.h" 14 | 15 | namespace DBoW2 { 16 | 17 | /// Base class of scoring functions 18 | class GeneralScoring 19 | { 20 | public: 21 | /** 22 | * Computes the score between two vectors. Vectors must be sorted and 23 | * normalized if necessary 24 | * @param v (in/out) 25 | * @param w (in/out) 26 | * @return score 27 | */ 28 | virtual double score(const BowVector &v, const BowVector &w) const = 0; 29 | 30 | /** 31 | * Returns whether a vector must be normalized before scoring according 32 | * to the scoring scheme 33 | * @param norm norm to use 34 | * @return true iff must normalize 35 | */ 36 | virtual bool mustNormalize(LNorm &norm) const = 0; 37 | 38 | /// Log of epsilon 39 | static const double LOG_EPS; 40 | // If you change the type of WordValue, make sure you change also the 41 | // epsilon value (this is needed by the KL method) 42 | 43 | virtual ~GeneralScoring() {} //!< Required for virtual base classes 44 | }; 45 | 46 | /** 47 | * Macro for defining Scoring classes 48 | * @param NAME name of class 49 | * @param MUSTNORMALIZE if vectors must be normalized to compute the score 50 | * @param NORM type of norm to use when MUSTNORMALIZE 51 | */ 52 | #define __SCORING_CLASS(NAME, MUSTNORMALIZE, NORM) \ 53 | NAME: public GeneralScoring \ 54 | { public: \ 55 | /** \ 56 | * Computes score between two vectors \ 57 | * @param v \ 58 | * @param w \ 59 | * @return score between v and w \ 60 | */ \ 61 | virtual double score(const BowVector &v, const BowVector &w) const; \ 62 | \ 63 | /** \ 64 | * Says if a vector must be normalized according to the scoring function \ 65 | * @param norm (out) if true, norm to use 66 | * @return true iff vectors must be normalized \ 67 | */ \ 68 | virtual inline bool mustNormalize(LNorm &norm) const \ 69 | { norm = NORM; return MUSTNORMALIZE; } \ 70 | } 71 | 72 | /// L1 Scoring object 73 | class __SCORING_CLASS(L1Scoring, true, L1); 74 | 75 | /// L2 Scoring object 76 | class __SCORING_CLASS(L2Scoring, true, L2); 77 | 78 | /// Chi square Scoring object 79 | class __SCORING_CLASS(ChiSquareScoring, true, L1); 80 | 81 | /// KL divergence Scoring object 82 | class __SCORING_CLASS(KLScoring, true, L1); 83 | 84 | /// Bhattacharyya Scoring object 85 | class __SCORING_CLASS(BhattacharyyaScoring, true, L1); 86 | 87 | /// Dot product Scoring object 88 | class __SCORING_CLASS(DotProductScoring, false, L1); 89 | 90 | #undef __SCORING_CLASS 91 | 92 | } // namespace DBoW2 93 | 94 | #endif 95 | 96 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/include/DUtils/DUtils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: DUtils.h 3 | * Project: DUtils library 4 | * Author: Dorian Galvez-Lopez 5 | * Date: October 6, 2009 6 | * Description: include file for including all the library functionalities 7 | * License: see the LICENSE.txt file 8 | * 9 | */ 10 | 11 | /*! \mainpage DUtils Library 12 | * 13 | * DUtils library for C++: 14 | * Collection of classes with general utilities for C++ applications. 15 | * 16 | * Written by Dorian Galvez-Lopez, 17 | * University of Zaragoza 18 | * 19 | * Check my website to obtain updates: http://doriangalvez.com 20 | * 21 | * \section license License 22 | * This program is free software: you can redistribute it and/or modify 23 | * it under the terms of the GNU Lesser General Public License (LGPL) as 24 | * published by the Free Software Foundation, either version 3 of the License, 25 | * or any later version. 26 | * 27 | */ 28 | 29 | 30 | #pragma once 31 | 32 | #ifndef __D_UTILS__ 33 | #define __D_UTILS__ 34 | 35 | /// Several utilities for C++ programs 36 | namespace DUtils 37 | { 38 | } 39 | 40 | // Timestamp 41 | #include "Timestamp.h" 42 | 43 | // Random numbers 44 | #include "Random.h" 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/include/DUtils/Random.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: Random.h 3 | * Project: DUtils library 4 | * Author: Dorian Galvez-Lopez 5 | * Date: April 2010, November 2011 6 | * Description: manages pseudo-random numbers 7 | * License: see the LICENSE.txt file 8 | * 9 | */ 10 | 11 | #pragma once 12 | #ifndef __D_RANDOM__ 13 | #define __D_RANDOM__ 14 | 15 | #include 16 | #include 17 | 18 | namespace DUtils { 19 | 20 | /// Functions to generate pseudo-random numbers 21 | class Random 22 | { 23 | public: 24 | class UnrepeatedRandomizer; 25 | 26 | public: 27 | /** 28 | * Sets the random number seed to the current time 29 | */ 30 | static void SeedRand(); 31 | 32 | /** 33 | * Sets the random number seed to the current time only the first 34 | * time this function is called 35 | */ 36 | static void SeedRandOnce(); 37 | 38 | /** 39 | * Sets the given random number seed 40 | * @param seed 41 | */ 42 | static void SeedRand(int seed); 43 | 44 | /** 45 | * Sets the given random number seed only the first time this function 46 | * is called 47 | * @param seed 48 | */ 49 | static void SeedRandOnce(int seed); 50 | 51 | /** 52 | * Returns a random number in the range [0..1] 53 | * @return random T number in [0..1] 54 | */ 55 | template 56 | static T RandomValue(){ 57 | return (T)rand()/(T)RAND_MAX; 58 | } 59 | 60 | /** 61 | * Returns a random number in the range [min..max] 62 | * @param min 63 | * @param max 64 | * @return random T number in [min..max] 65 | */ 66 | template 67 | static T RandomValue(T min, T max){ 68 | return Random::RandomValue() * (max - min) + min; 69 | } 70 | 71 | /** 72 | * Returns a random int in the range [min..max] 73 | * @param min 74 | * @param max 75 | * @return random int in [min..max] 76 | */ 77 | static int RandomInt(int min, int max); 78 | 79 | /** 80 | * Returns a random number from a gaussian distribution 81 | * @param mean 82 | * @param sigma standard deviation 83 | */ 84 | template 85 | static T RandomGaussianValue(T mean, T sigma) 86 | { 87 | // Box-Muller transformation 88 | T x1, x2, w, y1; 89 | 90 | do { 91 | x1 = (T)2. * RandomValue() - (T)1.; 92 | x2 = (T)2. * RandomValue() - (T)1.; 93 | w = x1 * x1 + x2 * x2; 94 | } while ( w >= (T)1. || w == (T)0. ); 95 | 96 | w = sqrt( ((T)-2.0 * log( w ) ) / w ); 97 | y1 = x1 * w; 98 | 99 | return( mean + y1 * sigma ); 100 | } 101 | 102 | private: 103 | 104 | /// If SeedRandOnce() or SeedRandOnce(int) have already been called 105 | static bool m_already_seeded; 106 | 107 | }; 108 | 109 | // --------------------------------------------------------------------------- 110 | 111 | /// Provides pseudo-random numbers with no repetitions 112 | class Random::UnrepeatedRandomizer 113 | { 114 | public: 115 | 116 | /** 117 | * Creates a randomizer that returns numbers in the range [min, max] 118 | * @param min 119 | * @param max 120 | */ 121 | UnrepeatedRandomizer(int min, int max); 122 | ~UnrepeatedRandomizer(){} 123 | 124 | /** 125 | * Copies a randomizer 126 | * @param rnd 127 | */ 128 | UnrepeatedRandomizer(const UnrepeatedRandomizer& rnd); 129 | 130 | /** 131 | * Copies a randomizer 132 | * @param rnd 133 | */ 134 | UnrepeatedRandomizer& operator=(const UnrepeatedRandomizer& rnd); 135 | 136 | /** 137 | * Returns a random number not given before. If all the possible values 138 | * were already given, the process starts again 139 | * @return unrepeated random number 140 | */ 141 | int get(); 142 | 143 | /** 144 | * Returns whether all the possible values between min and max were 145 | * already given. If get() is called when empty() is true, the behaviour 146 | * is the same than after creating the randomizer 147 | * @return true iff all the values were returned 148 | */ 149 | inline bool empty() const { return m_values.empty(); } 150 | 151 | /** 152 | * Returns the number of values still to be returned 153 | * @return amount of values to return 154 | */ 155 | inline unsigned int left() const { return m_values.size(); } 156 | 157 | /** 158 | * Resets the randomizer as it were just created 159 | */ 160 | void reset(); 161 | 162 | protected: 163 | 164 | /** 165 | * Creates the vector with available values 166 | */ 167 | void createValues(); 168 | 169 | protected: 170 | 171 | /// Min of range of values 172 | int m_min; 173 | /// Max of range of values 174 | int m_max; 175 | 176 | /// Available values 177 | std::vector m_values; 178 | 179 | }; 180 | 181 | } 182 | 183 | #endif 184 | 185 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/include/DUtils/Timestamp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: Timestamp.h 3 | * Author: Dorian Galvez-Lopez 4 | * Date: March 2009 5 | * Description: timestamping functions 6 | * License: see the LICENSE.txt file 7 | * 8 | */ 9 | 10 | #ifndef __D_TIMESTAMP__ 11 | #define __D_TIMESTAMP__ 12 | 13 | #include 14 | 15 | namespace DUtils { 16 | 17 | /// Timestamp 18 | class Timestamp 19 | { 20 | public: 21 | 22 | /// Options to initiate a timestamp 23 | enum tOptions 24 | { 25 | NONE = 0, 26 | CURRENT_TIME = 0x1, 27 | ZERO = 0x2 28 | }; 29 | 30 | public: 31 | 32 | /** 33 | * Creates a timestamp 34 | * @param option option to set the initial time stamp 35 | */ 36 | Timestamp(Timestamp::tOptions option = NONE); 37 | 38 | /** 39 | * Destructor 40 | */ 41 | virtual ~Timestamp(void); 42 | 43 | /** 44 | * Says if the timestamp is "empty": seconds and usecs are both 0, as 45 | * when initiated with the ZERO flag 46 | * @return true iif secs == usecs == 0 47 | */ 48 | bool empty() const; 49 | 50 | /** 51 | * Sets this instance to the current time 52 | */ 53 | void setToCurrentTime(); 54 | 55 | /** 56 | * Sets the timestamp from seconds and microseconds 57 | * @param secs: seconds 58 | * @param usecs: microseconds 59 | */ 60 | inline void setTime(unsigned long secs, unsigned long usecs){ 61 | m_secs = secs; 62 | m_usecs = usecs; 63 | } 64 | 65 | /** 66 | * Returns the timestamp in seconds and microseconds 67 | * @param secs seconds 68 | * @param usecs microseconds 69 | */ 70 | inline void getTime(unsigned long &secs, unsigned long &usecs) const 71 | { 72 | secs = m_secs; 73 | usecs = m_usecs; 74 | } 75 | 76 | /** 77 | * Sets the timestamp from a string with the time in seconds 78 | * @param stime: string such as "1235603336.036609" 79 | */ 80 | void setTime(const std::string &stime); 81 | 82 | /** 83 | * Sets the timestamp from a number of seconds from the epoch 84 | * @param s seconds from the epoch 85 | */ 86 | void setTime(double s); 87 | 88 | /** 89 | * Returns this timestamp as the number of seconds in (long) float format 90 | */ 91 | double getFloatTime() const; 92 | 93 | /** 94 | * Returns this timestamp as the number of seconds in fixed length string format 95 | */ 96 | std::string getStringTime() const; 97 | 98 | /** 99 | * Returns the difference in seconds between this timestamp (greater) and t (smaller) 100 | * If the order is swapped, a negative number is returned 101 | * @param t: timestamp to subtract from this timestamp 102 | * @return difference in seconds 103 | */ 104 | double operator- (const Timestamp &t) const; 105 | 106 | /** 107 | * Returns a copy of this timestamp + s seconds + us microseconds 108 | * @param s seconds 109 | * @param us microseconds 110 | */ 111 | Timestamp plus(unsigned long s, unsigned long us) const; 112 | 113 | /** 114 | * Returns a copy of this timestamp - s seconds - us microseconds 115 | * @param s seconds 116 | * @param us microseconds 117 | */ 118 | Timestamp minus(unsigned long s, unsigned long us) const; 119 | 120 | /** 121 | * Adds s seconds to this timestamp and returns a reference to itself 122 | * @param s seconds 123 | * @return reference to this timestamp 124 | */ 125 | Timestamp& operator+= (double s); 126 | 127 | /** 128 | * Substracts s seconds to this timestamp and returns a reference to itself 129 | * @param s seconds 130 | * @return reference to this timestamp 131 | */ 132 | Timestamp& operator-= (double s); 133 | 134 | /** 135 | * Returns a copy of this timestamp + s seconds 136 | * @param s: seconds 137 | */ 138 | Timestamp operator+ (double s) const; 139 | 140 | /** 141 | * Returns a copy of this timestamp - s seconds 142 | * @param s: seconds 143 | */ 144 | Timestamp operator- (double s) const; 145 | 146 | /** 147 | * Returns whether this timestamp is at the future of t 148 | * @param t 149 | */ 150 | bool operator> (const Timestamp &t) const; 151 | 152 | /** 153 | * Returns whether this timestamp is at the future of (or is the same as) t 154 | * @param t 155 | */ 156 | bool operator>= (const Timestamp &t) const; 157 | 158 | /** 159 | * Returns whether this timestamp and t represent the same instant 160 | * @param t 161 | */ 162 | bool operator== (const Timestamp &t) const; 163 | 164 | /** 165 | * Returns whether this timestamp is at the past of t 166 | * @param t 167 | */ 168 | bool operator< (const Timestamp &t) const; 169 | 170 | /** 171 | * Returns whether this timestamp is at the past of (or is the same as) t 172 | * @param t 173 | */ 174 | bool operator<= (const Timestamp &t) const; 175 | 176 | /** 177 | * Returns the timestamp in a human-readable string 178 | * @param machine_friendly if true, the returned string is formatted 179 | * to yyyymmdd_hhmmss, without weekday or spaces 180 | * @note This has not been tested under Windows 181 | * @note The timestamp is truncated to seconds 182 | */ 183 | std::string Format(bool machine_friendly = false) const; 184 | 185 | /** 186 | * Returns a string version of the elapsed time in seconds, with the format 187 | * xd hh:mm:ss, hh:mm:ss, mm:ss or s.us 188 | * @param s: elapsed seconds (given by getFloatTime) to format 189 | */ 190 | static std::string Format(double s); 191 | 192 | 193 | protected: 194 | /// Seconds 195 | unsigned long m_secs; // seconds 196 | /// Microseconds 197 | unsigned long m_usecs; // microseconds 198 | }; 199 | 200 | } 201 | 202 | #endif 203 | 204 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/lib/libDBoW2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/DBoW2/lib/libDBoW2.so -------------------------------------------------------------------------------- /3rdparty/DBoW2/src/DBoW2/BowVector.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * File: BowVector.cpp 3 | * Date: March 2011 4 | * Author: Dorian Galvez-Lopez 5 | * Description: bag of words vector 6 | * License: see the LICENSE.txt file 7 | * 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "BowVector.h" 17 | 18 | namespace DBoW2 { 19 | 20 | // -------------------------------------------------------------------------- 21 | 22 | BowVector::BowVector(void) 23 | { 24 | } 25 | 26 | // -------------------------------------------------------------------------- 27 | 28 | BowVector::~BowVector(void) 29 | { 30 | } 31 | 32 | // -------------------------------------------------------------------------- 33 | 34 | void BowVector::addWeight(WordId id, WordValue v) 35 | { 36 | BowVector::iterator vit = this->lower_bound(id); 37 | 38 | if(vit != this->end() && !(this->key_comp()(id, vit->first))) 39 | { 40 | vit->second += v; 41 | } 42 | else 43 | { 44 | this->insert(vit, BowVector::value_type(id, v)); 45 | } 46 | } 47 | 48 | // -------------------------------------------------------------------------- 49 | 50 | void BowVector::addIfNotExist(WordId id, WordValue v) 51 | { 52 | BowVector::iterator vit = this->lower_bound(id); 53 | 54 | if(vit == this->end() || (this->key_comp()(id, vit->first))) 55 | { 56 | this->insert(vit, BowVector::value_type(id, v)); 57 | } 58 | } 59 | 60 | // -------------------------------------------------------------------------- 61 | 62 | void BowVector::normalize(LNorm norm_type) 63 | { 64 | double norm = 0.0; 65 | BowVector::iterator it; 66 | 67 | if(norm_type == DBoW2::L1) 68 | { 69 | for(it = begin(); it != end(); ++it) 70 | norm += fabs(it->second); 71 | } 72 | else 73 | { 74 | for(it = begin(); it != end(); ++it) 75 | norm += it->second * it->second; 76 | norm = sqrt(norm); 77 | } 78 | 79 | if(norm > 0.0) 80 | { 81 | for(it = begin(); it != end(); ++it) 82 | it->second /= norm; 83 | } 84 | } 85 | 86 | // -------------------------------------------------------------------------- 87 | 88 | std::ostream& operator<< (std::ostream &out, const BowVector &v) 89 | { 90 | BowVector::const_iterator vit; 91 | std::vector::const_iterator iit; 92 | unsigned int i = 0; 93 | const unsigned int N = v.size(); 94 | for(vit = v.begin(); vit != v.end(); ++vit, ++i) 95 | { 96 | out << "<" << vit->first << ", " << vit->second << ">"; 97 | 98 | if(i < N-1) out << ", "; 99 | } 100 | return out; 101 | } 102 | 103 | // -------------------------------------------------------------------------- 104 | 105 | void BowVector::saveM(const std::string &filename, size_t W) const 106 | { 107 | std::fstream f(filename.c_str(), std::ios::out); 108 | 109 | WordId last = 0; 110 | BowVector::const_iterator bit; 111 | for(bit = this->begin(); bit != this->end(); ++bit) 112 | { 113 | for(; last < bit->first; ++last) 114 | { 115 | f << "0 "; 116 | } 117 | f << bit->second << " "; 118 | 119 | last = bit->first + 1; 120 | } 121 | for(; last < (WordId)W; ++last) 122 | f << "0 "; 123 | 124 | f.close(); 125 | } 126 | 127 | // -------------------------------------------------------------------------- 128 | 129 | } // namespace DBoW2 130 | 131 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/src/DBoW2/FeatureVector.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * File: FeatureVector.cpp 3 | * Date: November 2011 4 | * Author: Dorian Galvez-Lopez 5 | * Description: feature vector 6 | * License: see the LICENSE.txt file 7 | * 8 | */ 9 | 10 | #include "FeatureVector.h" 11 | #include 12 | #include 13 | #include 14 | 15 | namespace DBoW2 { 16 | 17 | // --------------------------------------------------------------------------- 18 | 19 | FeatureVector::FeatureVector(void) 20 | { 21 | } 22 | 23 | // --------------------------------------------------------------------------- 24 | 25 | FeatureVector::~FeatureVector(void) 26 | { 27 | } 28 | 29 | // --------------------------------------------------------------------------- 30 | 31 | void FeatureVector::addFeature(NodeId id, unsigned int i_feature) 32 | { 33 | FeatureVector::iterator vit = this->lower_bound(id); 34 | 35 | if(vit != this->end() && vit->first == id) 36 | { 37 | vit->second.push_back(i_feature); 38 | } 39 | else 40 | { 41 | vit = this->insert(vit, FeatureVector::value_type(id, 42 | std::vector() )); 43 | vit->second.push_back(i_feature); 44 | } 45 | } 46 | 47 | // --------------------------------------------------------------------------- 48 | 49 | std::ostream& operator<<(std::ostream &out, 50 | const FeatureVector &v) 51 | { 52 | if(!v.empty()) 53 | { 54 | FeatureVector::const_iterator vit = v.begin(); 55 | 56 | const std::vector* f = &vit->second; 57 | 58 | out << "<" << vit->first << ": ["; 59 | if(!f->empty()) out << (*f)[0]; 60 | for(unsigned int i = 1; i < f->size(); ++i) 61 | { 62 | out << ", " << (*f)[i]; 63 | } 64 | out << "]>"; 65 | 66 | for(++vit; vit != v.end(); ++vit) 67 | { 68 | f = &vit->second; 69 | 70 | out << ", <" << vit->first << ": ["; 71 | if(!f->empty()) out << (*f)[0]; 72 | for(unsigned int i = 1; i < f->size(); ++i) 73 | { 74 | out << ", " << (*f)[i]; 75 | } 76 | out << "]>"; 77 | } 78 | } 79 | 80 | return out; 81 | } 82 | 83 | // --------------------------------------------------------------------------- 84 | 85 | } // namespace DBoW2 86 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/src/DBoW2/QueryResults.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * File: QueryResults.cpp 3 | * Date: March, November 2011 4 | * Author: Dorian Galvez-Lopez 5 | * Description: structure to store results of database queries 6 | * License: see the LICENSE.txt file 7 | * 8 | */ 9 | 10 | #include 11 | #include 12 | #include "QueryResults.h" 13 | 14 | using namespace std; 15 | 16 | namespace DBoW2 17 | { 18 | 19 | // --------------------------------------------------------------------------- 20 | 21 | ostream & operator<<(ostream& os, const Result& ret ) 22 | { 23 | os << ""; 24 | return os; 25 | } 26 | 27 | // --------------------------------------------------------------------------- 28 | 29 | ostream & operator<<(ostream& os, const QueryResults& ret ) 30 | { 31 | if(ret.size() == 1) 32 | os << "1 result:" << endl; 33 | else 34 | os << ret.size() << " results:" << endl; 35 | 36 | QueryResults::const_iterator rit; 37 | for(rit = ret.begin(); rit != ret.end(); ++rit) 38 | { 39 | os << *rit; 40 | if(rit + 1 != ret.end()) os << endl; 41 | } 42 | return os; 43 | } 44 | 45 | // --------------------------------------------------------------------------- 46 | 47 | void QueryResults::saveM(const std::string &filename) const 48 | { 49 | fstream f(filename.c_str(), ios::out); 50 | 51 | QueryResults::const_iterator qit; 52 | for(qit = begin(); qit != end(); ++qit) 53 | { 54 | f << qit->Id << " " << qit->Score << endl; 55 | } 56 | 57 | f.close(); 58 | } 59 | 60 | // --------------------------------------------------------------------------- 61 | 62 | } // namespace DBoW2 63 | 64 | -------------------------------------------------------------------------------- /3rdparty/DBoW2/src/DUtils/Random.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * File: Random.cpp 3 | * Project: DUtils library 4 | * Author: Dorian Galvez-Lopez 5 | * Date: April 2010 6 | * Description: manages pseudo-random numbers 7 | * License: see the LICENSE.txt file 8 | * 9 | */ 10 | 11 | #include "Random.h" 12 | #include "Timestamp.h" 13 | #include 14 | using namespace std; 15 | 16 | bool DUtils::Random::m_already_seeded = false; 17 | 18 | void DUtils::Random::SeedRand(){ 19 | Timestamp time; 20 | time.setToCurrentTime(); 21 | srand((unsigned)time.getFloatTime()); 22 | } 23 | 24 | void DUtils::Random::SeedRandOnce() 25 | { 26 | if(!m_already_seeded) 27 | { 28 | DUtils::Random::SeedRand(); 29 | m_already_seeded = true; 30 | } 31 | } 32 | 33 | void DUtils::Random::SeedRand(int seed) 34 | { 35 | srand(seed); 36 | } 37 | 38 | void DUtils::Random::SeedRandOnce(int seed) 39 | { 40 | if(!m_already_seeded) 41 | { 42 | DUtils::Random::SeedRand(seed); 43 | m_already_seeded = true; 44 | } 45 | } 46 | 47 | int DUtils::Random::RandomInt(int min, int max){ 48 | int d = max - min + 1; 49 | return int(((double)rand()/((double)RAND_MAX + 1.0)) * d) + min; 50 | } 51 | 52 | // --------------------------------------------------------------------------- 53 | // --------------------------------------------------------------------------- 54 | 55 | DUtils::Random::UnrepeatedRandomizer::UnrepeatedRandomizer(int min, int max) 56 | { 57 | if(min <= max) 58 | { 59 | m_min = min; 60 | m_max = max; 61 | } 62 | else 63 | { 64 | m_min = max; 65 | m_max = min; 66 | } 67 | 68 | createValues(); 69 | } 70 | 71 | // --------------------------------------------------------------------------- 72 | 73 | DUtils::Random::UnrepeatedRandomizer::UnrepeatedRandomizer 74 | (const DUtils::Random::UnrepeatedRandomizer& rnd) 75 | { 76 | *this = rnd; 77 | } 78 | 79 | // --------------------------------------------------------------------------- 80 | 81 | int DUtils::Random::UnrepeatedRandomizer::get() 82 | { 83 | if(empty()) createValues(); 84 | 85 | DUtils::Random::SeedRandOnce(); 86 | 87 | int k = DUtils::Random::RandomInt(0, m_values.size()-1); 88 | int ret = m_values[k]; 89 | m_values[k] = m_values.back(); 90 | m_values.pop_back(); 91 | 92 | return ret; 93 | } 94 | 95 | // --------------------------------------------------------------------------- 96 | 97 | void DUtils::Random::UnrepeatedRandomizer::createValues() 98 | { 99 | int n = m_max - m_min + 1; 100 | 101 | m_values.resize(n); 102 | for(int i = 0; i < n; ++i) m_values[i] = m_min + i; 103 | } 104 | 105 | // --------------------------------------------------------------------------- 106 | 107 | void DUtils::Random::UnrepeatedRandomizer::reset() 108 | { 109 | if((int)m_values.size() != m_max - m_min + 1) createValues(); 110 | } 111 | 112 | // --------------------------------------------------------------------------- 113 | 114 | DUtils::Random::UnrepeatedRandomizer& 115 | DUtils::Random::UnrepeatedRandomizer::operator= 116 | (const DUtils::Random::UnrepeatedRandomizer& rnd) 117 | { 118 | if(this != &rnd) 119 | { 120 | this->m_min = rnd.m_min; 121 | this->m_max = rnd.m_max; 122 | this->m_values = rnd.m_values; 123 | } 124 | return *this; 125 | } 126 | 127 | // --------------------------------------------------------------------------- 128 | 129 | 130 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project( line-descriptor ) 2 | 3 | cmake_minimum_required(VERSION 2.7) 4 | find_package( OpenCV 3 REQUIRED) 5 | 6 | if(COMMAND cmake_policy) 7 | cmake_policy(SET CMP0003 NEW) 8 | endif(COMMAND cmake_policy) 9 | link_directories(${OpenCV_LIBS_DIR}) 10 | include_directories(${OpenCV2_INCLUDE_DIRS}) 11 | 12 | SET(BUILD_SHARED_LIBS ON) 13 | SET(CMAKE_MODULE_PATH $ENV{CMAKE_MODULE_PATH}) 14 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -O3 -mtune=native -march=native") 15 | 16 | set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/build) 17 | set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) 18 | 19 | include_directories( include ${OpenCV_INCLUDE_DIRS} ) 20 | list(APPEND LINK_LIBS ${OpenCV_LIBS} ) 21 | file(GLOB_RECURSE all_include_files RELATIVE "${CMAKE_SOURCE_DIR}" *.h *.hpp) 22 | 23 | link_directories(${CMAKE_SOURCE_DIR}/src/) 24 | file(GLOB_RECURSE all_source_files RELATIVE "${CMAKE_SOURCE_DIR}src/" *.cpp ) 25 | 26 | add_custom_target( linedesc_includes DEPENDS ${all_include_files} SOURCES ${all_source_files} ) 27 | 28 | add_library( linedesc ${all_source_files} ) 29 | target_link_libraries( linedesc ${LINK_LIBS} ) 30 | 31 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/README.md: -------------------------------------------------------------------------------- 1 | Binary descriptors for lines extracted from an image 2 | ==================================================== -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/3.5.1/CMakeCCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_C_COMPILER "/usr/bin/cc") 2 | set(CMAKE_C_COMPILER_ARG1 "") 3 | set(CMAKE_C_COMPILER_ID "GNU") 4 | set(CMAKE_C_COMPILER_VERSION "5.5.0") 5 | set(CMAKE_C_COMPILER_WRAPPER "") 6 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") 7 | set(CMAKE_C_COMPILE_FEATURES "c_function_prototypes;c_restrict;c_variadic_macros;c_static_assert") 8 | set(CMAKE_C90_COMPILE_FEATURES "c_function_prototypes") 9 | set(CMAKE_C99_COMPILE_FEATURES "c_restrict;c_variadic_macros") 10 | set(CMAKE_C11_COMPILE_FEATURES "c_static_assert") 11 | 12 | set(CMAKE_C_PLATFORM_ID "Linux") 13 | set(CMAKE_C_SIMULATE_ID "") 14 | set(CMAKE_C_SIMULATE_VERSION "") 15 | 16 | set(CMAKE_AR "/usr/bin/ar") 17 | set(CMAKE_RANLIB "/usr/bin/ranlib") 18 | set(CMAKE_LINKER "/usr/bin/ld") 19 | set(CMAKE_COMPILER_IS_GNUCC 1) 20 | set(CMAKE_C_COMPILER_LOADED 1) 21 | set(CMAKE_C_COMPILER_WORKS TRUE) 22 | set(CMAKE_C_ABI_COMPILED TRUE) 23 | set(CMAKE_COMPILER_IS_MINGW ) 24 | set(CMAKE_COMPILER_IS_CYGWIN ) 25 | if(CMAKE_COMPILER_IS_CYGWIN) 26 | set(CYGWIN 1) 27 | set(UNIX 1) 28 | endif() 29 | 30 | set(CMAKE_C_COMPILER_ENV_VAR "CC") 31 | 32 | if(CMAKE_COMPILER_IS_MINGW) 33 | set(MINGW 1) 34 | endif() 35 | set(CMAKE_C_COMPILER_ID_RUN 1) 36 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) 37 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) 38 | set(CMAKE_C_LINKER_PREFERENCE 10) 39 | 40 | # Save compiler ABI information. 41 | set(CMAKE_C_SIZEOF_DATA_PTR "8") 42 | set(CMAKE_C_COMPILER_ABI "ELF") 43 | set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 44 | 45 | if(CMAKE_C_SIZEOF_DATA_PTR) 46 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") 47 | endif() 48 | 49 | if(CMAKE_C_COMPILER_ABI) 50 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") 51 | endif() 52 | 53 | if(CMAKE_C_LIBRARY_ARCHITECTURE) 54 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 55 | endif() 56 | 57 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") 58 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) 59 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") 60 | endif() 61 | 62 | 63 | 64 | 65 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "c") 66 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") 67 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") 68 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/3.5.1/CMakeCXXCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_CXX_COMPILER "/usr/bin/c++") 2 | set(CMAKE_CXX_COMPILER_ARG1 "") 3 | set(CMAKE_CXX_COMPILER_ID "GNU") 4 | set(CMAKE_CXX_COMPILER_VERSION "5.5.0") 5 | set(CMAKE_CXX_COMPILER_WRAPPER "") 6 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "98") 7 | set(CMAKE_CXX_COMPILE_FEATURES "cxx_template_template_parameters;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") 8 | set(CMAKE_CXX98_COMPILE_FEATURES "cxx_template_template_parameters") 9 | set(CMAKE_CXX11_COMPILE_FEATURES "cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") 10 | set(CMAKE_CXX14_COMPILE_FEATURES "cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") 11 | 12 | set(CMAKE_CXX_PLATFORM_ID "Linux") 13 | set(CMAKE_CXX_SIMULATE_ID "") 14 | set(CMAKE_CXX_SIMULATE_VERSION "") 15 | 16 | set(CMAKE_AR "/usr/bin/ar") 17 | set(CMAKE_RANLIB "/usr/bin/ranlib") 18 | set(CMAKE_LINKER "/usr/bin/ld") 19 | set(CMAKE_COMPILER_IS_GNUCXX 1) 20 | set(CMAKE_CXX_COMPILER_LOADED 1) 21 | set(CMAKE_CXX_COMPILER_WORKS TRUE) 22 | set(CMAKE_CXX_ABI_COMPILED TRUE) 23 | set(CMAKE_COMPILER_IS_MINGW ) 24 | set(CMAKE_COMPILER_IS_CYGWIN ) 25 | if(CMAKE_COMPILER_IS_CYGWIN) 26 | set(CYGWIN 1) 27 | set(UNIX 1) 28 | endif() 29 | 30 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") 31 | 32 | if(CMAKE_COMPILER_IS_MINGW) 33 | set(MINGW 1) 34 | endif() 35 | set(CMAKE_CXX_COMPILER_ID_RUN 1) 36 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) 37 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP) 38 | set(CMAKE_CXX_LINKER_PREFERENCE 30) 39 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) 40 | 41 | # Save compiler ABI information. 42 | set(CMAKE_CXX_SIZEOF_DATA_PTR "8") 43 | set(CMAKE_CXX_COMPILER_ABI "ELF") 44 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 45 | 46 | if(CMAKE_CXX_SIZEOF_DATA_PTR) 47 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") 48 | endif() 49 | 50 | if(CMAKE_CXX_COMPILER_ABI) 51 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") 52 | endif() 53 | 54 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE) 55 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 56 | endif() 57 | 58 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") 59 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) 60 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") 61 | endif() 62 | 63 | 64 | 65 | 66 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;c") 67 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") 68 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") 69 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/line_descriptor/build/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/line_descriptor/build/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/3.5.1/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_HOST_SYSTEM "Linux-4.12.9-041209-generic") 2 | set(CMAKE_HOST_SYSTEM_NAME "Linux") 3 | set(CMAKE_HOST_SYSTEM_VERSION "4.12.9-041209-generic") 4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") 5 | 6 | 7 | 8 | set(CMAKE_SYSTEM "Linux-4.12.9-041209-generic") 9 | set(CMAKE_SYSTEM_NAME "Linux") 10 | set(CMAKE_SYSTEM_VERSION "4.12.9-041209-generic") 11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64") 12 | 13 | set(CMAKE_CROSSCOMPILING "FALSE") 14 | 15 | set(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/3.5.1/CompilerIdC/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/line_descriptor/build/CMakeFiles/3.5.1/CompilerIdC/a.out -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/3.5.1/CompilerIdCXX/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/line_descriptor/build/CMakeFiles/3.5.1/CompilerIdCXX/a.out -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/hc/桌面/pl-slam-master/3rdparty/line_descriptor") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/CMakeRuleHashes.txt: -------------------------------------------------------------------------------- 1 | # Hashes of file build rules. 2 | a521c134b35d3f59f798b275c9a30ef4 CMakeFiles/linedesc_includes 3 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/Makefile.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # The generator used is: 5 | set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") 6 | 7 | # The top level Makefile was generated from the following files: 8 | set(CMAKE_MAKEFILE_DEPENDS 9 | "CMakeCache.txt" 10 | "../CMakeLists.txt" 11 | "CMakeFiles/3.5.1/CMakeCCompiler.cmake" 12 | "CMakeFiles/3.5.1/CMakeCXXCompiler.cmake" 13 | "CMakeFiles/3.5.1/CMakeSystem.cmake" 14 | "/opt/ros/kinetic/share/OpenCV-3.3.1-dev/OpenCVConfig-version.cmake" 15 | "/opt/ros/kinetic/share/OpenCV-3.3.1-dev/OpenCVConfig.cmake" 16 | "/opt/ros/kinetic/share/OpenCV-3.3.1-dev/OpenCVModules-release.cmake" 17 | "/opt/ros/kinetic/share/OpenCV-3.3.1-dev/OpenCVModules.cmake" 18 | "/usr/share/cmake-3.5/Modules/CMakeCInformation.cmake" 19 | "/usr/share/cmake-3.5/Modules/CMakeCXXInformation.cmake" 20 | "/usr/share/cmake-3.5/Modules/CMakeCommonLanguageInclude.cmake" 21 | "/usr/share/cmake-3.5/Modules/CMakeGenericSystem.cmake" 22 | "/usr/share/cmake-3.5/Modules/CMakeLanguageInformation.cmake" 23 | "/usr/share/cmake-3.5/Modules/CMakeParseArguments.cmake" 24 | "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInformation.cmake" 25 | "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInitialize.cmake" 26 | "/usr/share/cmake-3.5/Modules/Compiler/GNU-C.cmake" 27 | "/usr/share/cmake-3.5/Modules/Compiler/GNU-CXX.cmake" 28 | "/usr/share/cmake-3.5/Modules/Compiler/GNU.cmake" 29 | "/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake" 30 | "/usr/share/cmake-3.5/Modules/FindPackageMessage.cmake" 31 | "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-C.cmake" 32 | "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-CXX.cmake" 33 | "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU.cmake" 34 | "/usr/share/cmake-3.5/Modules/Platform/Linux.cmake" 35 | "/usr/share/cmake-3.5/Modules/Platform/UnixPaths.cmake" 36 | ) 37 | 38 | # The corresponding makefile is: 39 | set(CMAKE_MAKEFILE_OUTPUTS 40 | "Makefile" 41 | "CMakeFiles/cmake.check_cache" 42 | ) 43 | 44 | # Byproducts of CMake generate step: 45 | set(CMAKE_MAKEFILE_PRODUCTS 46 | "CMakeFiles/CMakeDirectoryInformation.cmake" 47 | ) 48 | 49 | # Dependency information for all targets: 50 | set(CMAKE_DEPEND_INFO_FILES 51 | "CMakeFiles/linedesc_includes.dir/DependInfo.cmake" 52 | "CMakeFiles/linedesc.dir/DependInfo.cmake" 53 | ) 54 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/Makefile2: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # The main recursive all target 10 | all: 11 | 12 | .PHONY : all 13 | 14 | # The main recursive preinstall target 15 | preinstall: 16 | 17 | .PHONY : preinstall 18 | 19 | #============================================================================= 20 | # Special targets provided by cmake. 21 | 22 | # Disable implicit rules so canonical targets will work. 23 | .SUFFIXES: 24 | 25 | 26 | # Remove some rules from gmake that .SUFFIXES does not remove. 27 | SUFFIXES = 28 | 29 | .SUFFIXES: .hpux_make_needs_suffix_list 30 | 31 | 32 | # Suppress display of executed commands. 33 | $(VERBOSE).SILENT: 34 | 35 | 36 | # A target that is always out of date. 37 | cmake_force: 38 | 39 | .PHONY : cmake_force 40 | 41 | #============================================================================= 42 | # Set environment variables for the build. 43 | 44 | # The shell in which to execute make rules. 45 | SHELL = /bin/sh 46 | 47 | # The CMake executable. 48 | CMAKE_COMMAND = /usr/bin/cmake 49 | 50 | # The command to remove a file. 51 | RM = /usr/bin/cmake -E remove -f 52 | 53 | # Escaping for special characters. 54 | EQUALS = = 55 | 56 | # The top-level source directory on which CMake was run. 57 | CMAKE_SOURCE_DIR = /home/hc/桌面/pl-slam-master/3rdparty/line_descriptor 58 | 59 | # The top-level build directory on which CMake was run. 60 | CMAKE_BINARY_DIR = /home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build 61 | 62 | #============================================================================= 63 | # Target rules for target CMakeFiles/linedesc_includes.dir 64 | 65 | # All Build rule for target. 66 | CMakeFiles/linedesc_includes.dir/all: 67 | $(MAKE) -f CMakeFiles/linedesc_includes.dir/build.make CMakeFiles/linedesc_includes.dir/depend 68 | $(MAKE) -f CMakeFiles/linedesc_includes.dir/build.make CMakeFiles/linedesc_includes.dir/build 69 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build/CMakeFiles --progress-num= "Built target linedesc_includes" 70 | .PHONY : CMakeFiles/linedesc_includes.dir/all 71 | 72 | # Build rule for subdir invocation for target. 73 | CMakeFiles/linedesc_includes.dir/rule: cmake_check_build_system 74 | $(CMAKE_COMMAND) -E cmake_progress_start /home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build/CMakeFiles 0 75 | $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/linedesc_includes.dir/all 76 | $(CMAKE_COMMAND) -E cmake_progress_start /home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build/CMakeFiles 0 77 | .PHONY : CMakeFiles/linedesc_includes.dir/rule 78 | 79 | # Convenience name for target. 80 | linedesc_includes: CMakeFiles/linedesc_includes.dir/rule 81 | 82 | .PHONY : linedesc_includes 83 | 84 | # clean rule for target. 85 | CMakeFiles/linedesc_includes.dir/clean: 86 | $(MAKE) -f CMakeFiles/linedesc_includes.dir/build.make CMakeFiles/linedesc_includes.dir/clean 87 | .PHONY : CMakeFiles/linedesc_includes.dir/clean 88 | 89 | # clean rule for target. 90 | clean: CMakeFiles/linedesc_includes.dir/clean 91 | 92 | .PHONY : clean 93 | 94 | #============================================================================= 95 | # Target rules for target CMakeFiles/linedesc.dir 96 | 97 | # All Build rule for target. 98 | CMakeFiles/linedesc.dir/all: 99 | $(MAKE) -f CMakeFiles/linedesc.dir/build.make CMakeFiles/linedesc.dir/depend 100 | $(MAKE) -f CMakeFiles/linedesc.dir/build.make CMakeFiles/linedesc.dir/build 101 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build/CMakeFiles --progress-num=1,2,3,4,5,6 "Built target linedesc" 102 | .PHONY : CMakeFiles/linedesc.dir/all 103 | 104 | # Include target in all. 105 | all: CMakeFiles/linedesc.dir/all 106 | 107 | .PHONY : all 108 | 109 | # Build rule for subdir invocation for target. 110 | CMakeFiles/linedesc.dir/rule: cmake_check_build_system 111 | $(CMAKE_COMMAND) -E cmake_progress_start /home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build/CMakeFiles 6 112 | $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/linedesc.dir/all 113 | $(CMAKE_COMMAND) -E cmake_progress_start /home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build/CMakeFiles 0 114 | .PHONY : CMakeFiles/linedesc.dir/rule 115 | 116 | # Convenience name for target. 117 | linedesc: CMakeFiles/linedesc.dir/rule 118 | 119 | .PHONY : linedesc 120 | 121 | # clean rule for target. 122 | CMakeFiles/linedesc.dir/clean: 123 | $(MAKE) -f CMakeFiles/linedesc.dir/build.make CMakeFiles/linedesc.dir/clean 124 | .PHONY : CMakeFiles/linedesc.dir/clean 125 | 126 | # clean rule for target. 127 | clean: CMakeFiles/linedesc.dir/clean 128 | 129 | .PHONY : clean 130 | 131 | #============================================================================= 132 | # Special targets to cleanup operation of make. 133 | 134 | # Special rule to run CMake to check the build system integrity. 135 | # No rule that depends on this can have commands that come from listfiles 136 | # because they might be regenerated. 137 | cmake_check_build_system: 138 | $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 139 | .PHONY : cmake_check_build_system 140 | 141 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/TargetDirectories.txt: -------------------------------------------------------------------------------- 1 | /home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build/CMakeFiles/edit_cache.dir 2 | /home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build/CMakeFiles/rebuild_cache.dir 3 | /home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build/CMakeFiles/linedesc_includes.dir 4 | /home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir 5 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/feature_tests.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/line_descriptor/build/CMakeFiles/feature_tests.bin -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/feature_tests.c: -------------------------------------------------------------------------------- 1 | 2 | const char features[] = {"\n" 3 | "C_FEATURE:" 4 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 5 | "1" 6 | #else 7 | "0" 8 | #endif 9 | "c_function_prototypes\n" 10 | "C_FEATURE:" 11 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 12 | "1" 13 | #else 14 | "0" 15 | #endif 16 | "c_restrict\n" 17 | "C_FEATURE:" 18 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L 19 | "1" 20 | #else 21 | "0" 22 | #endif 23 | "c_static_assert\n" 24 | "C_FEATURE:" 25 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 26 | "1" 27 | #else 28 | "0" 29 | #endif 30 | "c_variadic_macros\n" 31 | 32 | }; 33 | 34 | int main(int argc, char** argv) { (void)argv; return features[argc]; } 35 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir/CMakeFiles/3.5.1/CompilerIdCXX/CMakeCXXCompilerId.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir/CMakeFiles/3.5.1/CompilerIdCXX/CMakeCXXCompilerId.cpp.o -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build/CMakeFiles/3.5.1/CompilerIdCXX/CMakeCXXCompilerId.cpp" "/home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir/CMakeFiles/3.5.1/CompilerIdCXX/CMakeCXXCompilerId.cpp.o" 8 | "/home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/src/LSDDetector_custom.cpp" "/home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir/src/LSDDetector_custom.cpp.o" 9 | "/home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/src/binary_descriptor_custom.cpp" "/home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir/src/binary_descriptor_custom.cpp.o" 10 | "/home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/src/binary_descriptor_matcher.cpp" "/home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir/src/binary_descriptor_matcher.cpp.o" 11 | "/home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/src/draw_custom.cpp" "/home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir/src/draw_custom.cpp.o" 12 | ) 13 | set(CMAKE_CXX_COMPILER_ID "GNU") 14 | 15 | # The include file search paths: 16 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 17 | "../include" 18 | "/opt/ros/kinetic/include/opencv-3.3.1-dev" 19 | "/opt/ros/kinetic/include/opencv-3.3.1-dev/opencv" 20 | ) 21 | 22 | # Targets to which this target links. 23 | set(CMAKE_TARGET_LINKED_INFO_FILES 24 | ) 25 | 26 | # Fortran module output directory. 27 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 28 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/linedesc.dir/CMakeFiles/3.5.1/CompilerIdCXX/CMakeCXXCompilerId.cpp.o" 3 | "CMakeFiles/linedesc.dir/src/draw_custom.cpp.o" 4 | "CMakeFiles/linedesc.dir/src/binary_descriptor_custom.cpp.o" 5 | "CMakeFiles/linedesc.dir/src/binary_descriptor_matcher.cpp.o" 6 | "CMakeFiles/linedesc.dir/src/LSDDetector_custom.cpp.o" 7 | "../lib/liblinedesc.pdb" 8 | "../lib/liblinedesc.so" 9 | ) 10 | 11 | # Per-language clean rules from dependency scanning. 12 | foreach(lang CXX) 13 | include(CMakeFiles/linedesc.dir/cmake_clean_${lang}.cmake OPTIONAL) 14 | endforeach() 15 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # compile CXX with /usr/bin/c++ 5 | CXX_FLAGS = -std=c++0x -O3 -mtune=native -march=native -fPIC 6 | 7 | CXX_DEFINES = -Dlinedesc_EXPORTS 8 | 9 | CXX_INCLUDES = -I/home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/include -isystem /opt/ros/kinetic/include/opencv-3.3.1-dev -isystem /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv 10 | 11 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/c++ -fPIC -std=c++0x -O3 -mtune=native -march=native -shared -Wl,-soname,liblinedesc.so -o ../lib/liblinedesc.so CMakeFiles/linedesc.dir/CMakeFiles/3.5.1/CompilerIdCXX/CMakeCXXCompilerId.cpp.o CMakeFiles/linedesc.dir/src/draw_custom.cpp.o CMakeFiles/linedesc.dir/src/binary_descriptor_custom.cpp.o CMakeFiles/linedesc.dir/src/binary_descriptor_matcher.cpp.o CMakeFiles/linedesc.dir/src/LSDDetector_custom.cpp.o -L/home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/src /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_stitching3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_superres3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_videostab3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_aruco3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_bgsegm3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_bioinspired3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_ccalib3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_cvv3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_dpm3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_face3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_fuzzy3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_hdf3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_img_hash3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_line_descriptor3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_optflow3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_reg3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_rgbd3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_saliency3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_stereo3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_structured_light3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_surface_matching3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_tracking3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_xfeatures2d3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_ximgproc3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_xobjdetect3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_xphoto3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_shape3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_photo3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_datasets3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_plot3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_text3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_dnn3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_ml3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_video3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_calib3d3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_features2d3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_highgui3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_videoio3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_viz3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_phase_unwrapping3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_flann3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_imgcodecs3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_objdetect3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_imgproc3.so.3.3.1 /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_core3.so.3.3.1 -Wl,-rpath,/home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/src:/opt/ros/kinetic/lib/x86_64-linux-gnu 2 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 1 2 | CMAKE_PROGRESS_2 = 2 3 | CMAKE_PROGRESS_3 = 3 4 | CMAKE_PROGRESS_4 = 4 5 | CMAKE_PROGRESS_5 = 5 6 | CMAKE_PROGRESS_6 = 6 7 | 8 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir/src/LSDDetector_custom.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir/src/LSDDetector_custom.cpp.o -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir/src/binary_descriptor_custom.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir/src/binary_descriptor_custom.cpp.o -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir/src/binary_descriptor_matcher.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir/src/binary_descriptor_matcher.cpp.o -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir/src/draw_custom.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/line_descriptor/build/CMakeFiles/linedesc.dir/src/draw_custom.cpp.o -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/linedesc_includes.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | ) 4 | # The set of files for implicit dependencies of each language: 5 | 6 | # Targets to which this target links. 7 | set(CMAKE_TARGET_LINKED_INFO_FILES 8 | ) 9 | 10 | # Fortran module output directory. 11 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 12 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/linedesc_includes.dir/build.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # Delete rule output on recipe failure. 5 | .DELETE_ON_ERROR: 6 | 7 | 8 | #============================================================================= 9 | # Special targets provided by cmake. 10 | 11 | # Disable implicit rules so canonical targets will work. 12 | .SUFFIXES: 13 | 14 | 15 | # Remove some rules from gmake that .SUFFIXES does not remove. 16 | SUFFIXES = 17 | 18 | .SUFFIXES: .hpux_make_needs_suffix_list 19 | 20 | 21 | # Suppress display of executed commands. 22 | $(VERBOSE).SILENT: 23 | 24 | 25 | # A target that is always out of date. 26 | cmake_force: 27 | 28 | .PHONY : cmake_force 29 | 30 | #============================================================================= 31 | # Set environment variables for the build. 32 | 33 | # The shell in which to execute make rules. 34 | SHELL = /bin/sh 35 | 36 | # The CMake executable. 37 | CMAKE_COMMAND = /usr/bin/cmake 38 | 39 | # The command to remove a file. 40 | RM = /usr/bin/cmake -E remove -f 41 | 42 | # Escaping for special characters. 43 | EQUALS = = 44 | 45 | # The top-level source directory on which CMake was run. 46 | CMAKE_SOURCE_DIR = /home/hc/桌面/pl-slam-master/3rdparty/line_descriptor 47 | 48 | # The top-level build directory on which CMake was run. 49 | CMAKE_BINARY_DIR = /home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build 50 | 51 | # Utility rule file for linedesc_includes. 52 | 53 | # Include the progress variables for this target. 54 | include CMakeFiles/linedesc_includes.dir/progress.make 55 | 56 | CMakeFiles/linedesc_includes: ../src/precomp_custom.hpp 57 | CMakeFiles/linedesc_includes: ../src/types_custom.hpp 58 | CMakeFiles/linedesc_includes: ../src/bitops_custom.hpp 59 | CMakeFiles/linedesc_includes: ../src/bitarray_custom.hpp 60 | CMakeFiles/linedesc_includes: ../include/line_descriptor_custom.hpp 61 | CMakeFiles/linedesc_includes: ../include/line_descriptor/descriptor_custom.hpp 62 | 63 | 64 | linedesc_includes: CMakeFiles/linedesc_includes 65 | linedesc_includes: CMakeFiles/linedesc_includes.dir/build.make 66 | 67 | .PHONY : linedesc_includes 68 | 69 | # Rule to build all files generated by this target. 70 | CMakeFiles/linedesc_includes.dir/build: linedesc_includes 71 | 72 | .PHONY : CMakeFiles/linedesc_includes.dir/build 73 | 74 | CMakeFiles/linedesc_includes.dir/clean: 75 | $(CMAKE_COMMAND) -P CMakeFiles/linedesc_includes.dir/cmake_clean.cmake 76 | .PHONY : CMakeFiles/linedesc_includes.dir/clean 77 | 78 | CMakeFiles/linedesc_includes.dir/depend: 79 | cd /home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/hc/桌面/pl-slam-master/3rdparty/line_descriptor /home/hc/桌面/pl-slam-master/3rdparty/line_descriptor /home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build /home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build /home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build/CMakeFiles/linedesc_includes.dir/DependInfo.cmake --color=$(COLOR) 80 | .PHONY : CMakeFiles/linedesc_includes.dir/depend 81 | 82 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/linedesc_includes.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/linedesc_includes" 3 | ) 4 | 5 | # Per-language clean rules from dependency scanning. 6 | foreach(lang CXX) 7 | include(CMakeFiles/linedesc_includes.dir/cmake_clean_${lang}.cmake OPTIONAL) 8 | endforeach() 9 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/linedesc_includes.dir/progress.make: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 6 2 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/build/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /home/hc/桌面/pl-slam-master/3rdparty/line_descriptor 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | if(CMAKE_INSTALL_COMPONENT) 36 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") 37 | else() 38 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") 39 | endif() 40 | 41 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT 42 | "${CMAKE_INSTALL_MANIFEST_FILES}") 43 | file(WRITE "/home/hc/桌面/pl-slam-master/3rdparty/line_descriptor/build/${CMAKE_INSTALL_MANIFEST}" 44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}") 45 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/lib/liblinedesc.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/3rdparty/line_descriptor/lib/liblinedesc.so -------------------------------------------------------------------------------- /3rdparty/line_descriptor/src/bitarray_custom.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2014, Mohammad Norouzi, Ali Punjani, David J. Fleet, 14 | // all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_BITARRAY_HPP 44 | #define __OPENCV_BITARRAY_HPP 45 | 46 | #ifdef _MSC_VER 47 | #pragma warning( disable : 4267 ) 48 | #endif 49 | 50 | #include "types_custom.hpp" 51 | #include 52 | #include 53 | #include 54 | 55 | /* class defining a sequence of bits */ 56 | class bitarray 57 | { 58 | 59 | public: 60 | /* pointer to bits sequence and sequence's length */ 61 | UINT32 *arr; 62 | UINT32 length; 63 | 64 | /* constructor setting default values */ 65 | bitarray() 66 | { 67 | arr = NULL; 68 | length = 0; 69 | } 70 | 71 | /* constructor setting sequence's length */ 72 | bitarray( UINT64 _bits ) 73 | { 74 | init( _bits ); 75 | } 76 | 77 | /* initializer of private fields */ 78 | void init( UINT64 _bits ) 79 | { 80 | length = (UINT32) ceil( _bits / 32.00 ); 81 | arr = new UINT32[length]; 82 | erase(); 83 | } 84 | 85 | /* destructor */ 86 | ~bitarray() 87 | { 88 | if( arr ) 89 | delete[] arr; 90 | } 91 | 92 | inline void flip( UINT64 index ) 93 | { 94 | arr[index >> 5] ^= ( (UINT32) 0x01 ) << ( index % 32 ); 95 | } 96 | 97 | inline void set( UINT64 index ) 98 | { 99 | arr[index >> 5] |= ( (UINT32) 0x01 ) << ( index % 32 ); 100 | } 101 | 102 | inline UINT8 get( UINT64 index ) 103 | { 104 | return ( arr[index >> 5] & ( ( (UINT32) 0x01 ) << ( index % 32 ) ) ) != 0; 105 | } 106 | 107 | /* reserve menory for an UINT32 */ 108 | inline void erase() 109 | { 110 | memset( arr, 0, sizeof(UINT32) * length ); 111 | } 112 | 113 | }; 114 | 115 | #endif 116 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/src/precomp_custom.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2014, Biagio Montesano, all rights reserved. 14 | // Third party copyrights are property of their respective owners. 15 | // 16 | // Redistribution and use in source and binary forms, with or without modification, 17 | // are permitted provided that the following conditions are met: 18 | // 19 | // * Redistribution's of source code must retain the above copyright notice, 20 | // this list of conditions and the following disclaimer. 21 | // 22 | // * Redistribution's in binary form must reproduce the above copyright notice, 23 | // this list of conditions and the following disclaimer in the documentation 24 | // and/or other materials provided with the distribution. 25 | // 26 | // * The name of the copyright holders may not be used to endorse or promote products 27 | // derived from this software without specific prior written permission. 28 | // 29 | // This software is provided by the copyright holders and contributors "as is" and 30 | // any express or implied warranties, including, but not limited to, the implied 31 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 32 | // In no event shall the Intel Corporation or contributors be liable for any direct, 33 | // indirect, incidental, special, exemplary, or consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | // 40 | //M*/ 41 | 42 | #ifndef __OPENCV_PRECOMP_H__ 43 | #define __OPENCV_PRECOMP_H__ 44 | 45 | #ifdef _MSC_VER 46 | #pragma warning( disable : 4267 ) 47 | #endif 48 | 49 | #define _USE_MATH_DEFINES 50 | 51 | #include 52 | #include "opencv2/core/utility.hpp" 53 | #include 54 | #include 55 | #include 56 | #include "opencv2/core.hpp" 57 | 58 | #include 59 | #include 60 | #include 61 | #include 62 | #include 63 | #include 64 | #include 65 | #include 66 | #include 67 | #include 68 | #include 69 | 70 | #include "bitarray_custom.hpp" 71 | #include "bitops_custom.hpp" 72 | #include "types_custom.hpp" 73 | 74 | #include "line_descriptor_custom.hpp" 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /3rdparty/line_descriptor/src/types_custom.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2014, Mohammad Norouzi, Ali Punjani, David J. Fleet, 14 | // all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #if defined _MSC_VER && _MSC_VER <= 1700 44 | #include 45 | #else 46 | #include 47 | #endif 48 | 49 | #ifndef __OPENCV_TYPES_HPP 50 | #define __OPENCV_TYPES_HPP 51 | 52 | #ifdef _MSC_VER 53 | #pragma warning( disable : 4267 ) 54 | #endif 55 | 56 | /* define data types */ 57 | typedef uint64_t UINT64; 58 | typedef uint32_t UINT32; 59 | typedef uint16_t UINT16; 60 | typedef uint8_t UINT8; 61 | 62 | /* define constants */ 63 | #define UINT64_1 ((UINT64)0x01) 64 | #define UINT32_1 ((UINT32)0x01) 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project( PL-SLAM ) 2 | 3 | cmake_minimum_required(VERSION 2.7) 4 | 5 | list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake_modules") 6 | 7 | find_package(OpenCV 3 REQUIRED) 8 | find_package(Boost REQUIRED COMPONENTS regex thread system filesystem) 9 | find_package(G2O REQUIRED) 10 | #find_package(Eigen3 REQUIRED) 11 | include_directories("/usr/local/include/eigen3") 12 | if(COMMAND cmake_policy) 13 | cmake_policy(SET CMP0003 NEW) 14 | endif(COMMAND cmake_policy) 15 | link_directories(${OpenCV_LIBS_DIR}) 16 | include_directories(${OpenCV2_INCLUDE_DIRS}) 17 | 18 | # Odometry library (Future TODO: integrate with this library) 19 | SET( StVO_LIBRARY "" CACHE FILEPATH "Visual Odometry Library" ) 20 | SET( StVO_INCLUDE_DIR "" CACHE PATH "Visual Odometry Include folder" ) 21 | 22 | set(DEFAULT_HAS_MRPT ON) 23 | set(HAS_MRPT ${DEFAULT_HAS_MRPT} CACHE BOOL "Build the PointGrey Bumblebee2 SVO application that employs the MRPT library") 24 | 25 | set(DEFAULT_USE_LINE_PLUKER OFF) 26 | set(USE_LINE_PLUKER ${DEFAULT_USE_LINE_PLUKER} CACHE BOOL "Use Line Feature With Pluker Represent") 27 | 28 | if(USE_LINE_PLUKER) 29 | add_definitions(-DUSE_LINE_PLUKER) 30 | endif(USE_LINE_PLUKER) 31 | 32 | SET(BUILD_SHARED_LIBS ON) 33 | SET(CMAKE_MODULE_PATH $ENV{CMAKE_MODULE_PATH}) 34 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3 -mtune=native") 35 | 36 | add_definitions(-DBOOST_NO_CXX11_SCOPED_ENUMS) 37 | 38 | # MRPT library (optional, only with representation purposes) 39 | if(HAS_MRPT) 40 | FIND_PACKAGE(MRPT REQUIRED base opengl gui hwdrivers) 41 | set(MRPT_DONT_USE_DBG_LIBS 1) #use release libraries for linking even if "Debug" CMake build 42 | add_definitions(-DHAS_MRPT) 43 | endif(HAS_MRPT) 44 | 45 | 46 | # YAML library 47 | FIND_PACKAGE(yaml-cpp REQUIRED CONFIG PATHS ${YAML_PATHS}) 48 | 49 | set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/build) 50 | set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) 51 | 52 | SET(G2O_LIBS g2o_cli g2o_ext_freeglut_minimal g2o_simulator g2o_solver_slam2d_linear g2o_types_icp g2o_types_slam2d g2o_core g2o_interface g2o_solver_csparse g2o_solver_structure_only g2o_types_sba g2o_types_slam3d g2o_csparse_extension g2o_opengl_helper g2o_solver_dense g2o_stuff g2o_types_sclam2d g2o_parser g2o_solver_pcg g2o_types_data g2o_types_sim3 cxsparse g2o_ext_csparse cholmod ) 53 | 54 | # Include dirs 55 | include_directories( 56 | include 57 | # ${Eigen3_INCLUDE_DIRS} 58 | ${OpenCV_INCLUDE_DIRS} 59 | ${Boost_INCLUDE_DIRS} 60 | ${YAML_CPP_INCLUDE_DIRS} 61 | include2 62 | ${PROJECT_SOURCE_DIR}/3rdparty/DBoW2/include/ 63 | ${PROJECT_SOURCE_DIR}/3rdparty/line_descriptor/include/ 64 | ${G2O_INCLUDE_DIR} 65 | /usr/include/suitesparse # for cholmod 66 | ) 67 | 68 | # Set link libraries 69 | list(APPEND LINK_LIBS 70 | ${OpenCV_LIBS} 71 | ${Boost_LIBRARIES} 72 | ${YAML_CPP_LIBRARIES} 73 | ${G2O_LIBS} 74 | # ${PROJECT_SOURCE_DIR}/../stvo-pl/lib/libstvo.so 75 | ${PROJECT_SOURCE_DIR}/3rdparty/DBoW2/lib/libDBoW2.so 76 | ${PROJECT_SOURCE_DIR}/3rdparty/line_descriptor/lib/liblinedesc.so 77 | ) 78 | 79 | # Set source files 80 | if(HAS_MRPT) 81 | list(APPEND SOURCEFILES 82 | src/mapHandler.cpp 83 | src/mapFeatures.cpp 84 | src/keyFrame.cpp 85 | src/slamConfig.cpp 86 | src/slamScene.cpp 87 | src2/auxiliar.cpp 88 | src2/config.cpp 89 | src2/dataset.cpp 90 | # src2/featureMatching.cpp 91 | src2/gridStructure.cpp 92 | src2/lineIterator.cpp 93 | src2/matching.cpp 94 | src2/pinholeStereoCamera.cpp 95 | src2/sceneRepresentation.cpp 96 | src2/stereoFeatures.cpp 97 | src2/stereoFrame.cpp 98 | src2/stereoFrameHandler.cpp 99 | src2/timer.cpp 100 | ) 101 | else() 102 | list(APPEND SOURCEFILES 103 | src/mapHandler.cpp 104 | src/mapFeatures.cpp 105 | src/keyFrame.cpp 106 | src/slamConfig.cpp 107 | ) 108 | endif() 109 | 110 | # List all files (headers) contained by StVO-PL library 111 | file(GLOB_RECURSE all_include_files RELATIVE "${CMAKE_SOURCE_DIR}" *.h *.hpp) 112 | 113 | # Visualize the files of this directory in IDE creating an custom empty target 114 | add_custom_target( plslam_includes DEPENDS ${all_include_files} SOURCES ${all_include_files} ) 115 | 116 | # Create StVO-PL library 117 | add_library(plslam SHARED ${SOURCEFILES}) 118 | 119 | if(HAS_MRPT) 120 | target_link_libraries(plslam ${LINK_LIBS} ${MRPT_LIBS} ) 121 | else() 122 | target_link_libraries(plslam ${LINK_LIBS}) 123 | endif() 124 | 125 | # Applications 126 | if(HAS_MRPT) 127 | add_executable ( plslam_dataset app/plslam_dataset.cpp ) 128 | target_link_libraries( plslam_dataset plslam ) 129 | endif(HAS_MRPT) 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PL-SLAM with Plücker And Orthogonal representation Line Feature 2 | 3 | ## Reference 4 | 1. PL-SLAM: `https://github.com/rubengooj/pl-slam.git` 5 | 2. PL-VIO: `https://github.com/HeYijia/PL-VIO.git` 6 | 3. SLAM中线特征的参数化和求导: `https://zhuanlan.zhihu.com/p/65674067` 7 | 8 | ## Remarks 9 | 1. The original PL-SLAM uses Line segment feature with two end point, 10 | here I change it to Plücker Parameterization and use Orthogonal representation for optimize. 11 | 2. The closingloop thread should keep closed when run in the mode of Plücker Parameterization and use Orthogonal representation. 12 | 3. Change the variable `DEFAULT_USE_LINE_PLUKER` in CMakeLists.txt to choose whether use Plücker And Orthogonal representation or the original one. 13 | 14 | ## Compare between this two Line representation 15 |
16 | 17 | 18 | 19 |
20 | 21 | The left image is the result of original PL-SLAM, and the right is the result of Plücker And Orthogonal representation, only a small difference between them. -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | echo "Building 3rdparty/line_descriptor ... " 2 | cd 3rdparty/line_descriptor 3 | mkdir build 4 | cd build 5 | cmake .. 6 | make -j8 7 | cd ../../../ 8 | 9 | echo "Building 3rdparty/DBoW2 ... " 10 | cd 3rdparty/DBoW2 11 | mkdir build 12 | cd build 13 | cmake .. 14 | make -j8 15 | cd ../../../ 16 | 17 | echo "Uncompressing vocabulary ..." 18 | cd vocabulary 19 | tar -xf voc.tar.gz 20 | cd .. 21 | 22 | echo "Building PL-SLAM ... " 23 | mkdir build 24 | cd build 25 | cmake .. 26 | make -j8 27 | -------------------------------------------------------------------------------- /cmake_modules/FindCSparse.cmake: -------------------------------------------------------------------------------- 1 | # Look for csparse; note the difference in the directory specifications! 2 | find_path(CSPARSE_INCLUDE_DIR NAMES cs.h 3 | PATHS 4 | /usr/include/suitesparse 5 | /usr/include 6 | /opt/local/include 7 | /usr/local/include 8 | /sw/include 9 | /usr/include/ufsparse 10 | /opt/local/include/ufsparse 11 | /usr/local/include/ufsparse 12 | /sw/include/ufsparse 13 | PATH_SUFFIXES 14 | suitesparse 15 | ) 16 | 17 | find_library(CSPARSE_LIBRARY NAMES cxsparse libcxsparse 18 | PATHS 19 | /usr/lib 20 | /usr/local/lib 21 | /opt/local/lib 22 | /sw/lib 23 | ) 24 | 25 | include(FindPackageHandleStandardArgs) 26 | find_package_handle_standard_args(CSPARSE DEFAULT_MSG 27 | CSPARSE_INCLUDE_DIR CSPARSE_LIBRARY) 28 | -------------------------------------------------------------------------------- /cmake_modules/FindG2O.cmake: -------------------------------------------------------------------------------- 1 | # Find the header files 2 | 3 | FIND_PATH(G2O_INCLUDE_DIR g2o/core/base_vertex.h 4 | ${G2O_ROOT}/include 5 | $ENV{G2O_ROOT}/include 6 | $ENV{G2O_ROOT} 7 | /usr/local/include 8 | /usr/include 9 | /opt/local/include 10 | /sw/local/include 11 | /sw/include 12 | NO_DEFAULT_PATH 13 | ) 14 | 15 | # Macro to unify finding both the debug and release versions of the 16 | # libraries; this is adapted from the OpenSceneGraph FIND_LIBRARY 17 | # macro. 18 | 19 | MACRO(FIND_G2O_LIBRARY MYLIBRARY MYLIBRARYNAME) 20 | 21 | FIND_LIBRARY("${MYLIBRARY}_DEBUG" 22 | NAMES "g2o_${MYLIBRARYNAME}_d" 23 | PATHS 24 | ${G2O_ROOT}/lib/Debug 25 | ${G2O_ROOT}/lib 26 | $ENV{G2O_ROOT}/lib/Debug 27 | $ENV{G2O_ROOT}/lib 28 | NO_DEFAULT_PATH 29 | ) 30 | 31 | FIND_LIBRARY("${MYLIBRARY}_DEBUG" 32 | NAMES "g2o_${MYLIBRARYNAME}_d" 33 | PATHS 34 | ~/Library/Frameworks 35 | /Library/Frameworks 36 | /usr/local/lib 37 | /usr/local/lib64 38 | /usr/lib 39 | /usr/lib64 40 | /opt/local/lib 41 | /sw/local/lib 42 | /sw/lib 43 | ) 44 | 45 | FIND_LIBRARY(${MYLIBRARY} 46 | NAMES "g2o_${MYLIBRARYNAME}" 47 | PATHS 48 | ${G2O_ROOT}/lib/Release 49 | ${G2O_ROOT}/lib 50 | $ENV{G2O_ROOT}/lib/Release 51 | $ENV{G2O_ROOT}/lib 52 | NO_DEFAULT_PATH 53 | ) 54 | 55 | FIND_LIBRARY(${MYLIBRARY} 56 | NAMES "g2o_${MYLIBRARYNAME}" 57 | PATHS 58 | ~/Library/Frameworks 59 | /Library/Frameworks 60 | /usr/local/lib 61 | /usr/local/lib64 62 | /usr/lib 63 | /usr/lib64 64 | /opt/local/lib 65 | /sw/local/lib 66 | /sw/lib 67 | ) 68 | 69 | IF(NOT ${MYLIBRARY}_DEBUG) 70 | IF(MYLIBRARY) 71 | SET(${MYLIBRARY}_DEBUG ${MYLIBRARY}) 72 | ENDIF(MYLIBRARY) 73 | ENDIF( NOT ${MYLIBRARY}_DEBUG) 74 | 75 | ENDMACRO(FIND_G2O_LIBRARY LIBRARY LIBRARYNAME) 76 | 77 | # Find the core elements 78 | FIND_G2O_LIBRARY(G2O_STUFF_LIBRARY stuff) 79 | FIND_G2O_LIBRARY(G2O_CORE_LIBRARY core) 80 | 81 | # Find the CLI library 82 | FIND_G2O_LIBRARY(G2O_CLI_LIBRARY cli) 83 | 84 | # Find the pluggable solvers 85 | FIND_G2O_LIBRARY(G2O_SOLVER_CHOLMOD solver_cholmod) 86 | FIND_G2O_LIBRARY(G2O_SOLVER_CSPARSE solver_csparse) 87 | FIND_G2O_LIBRARY(G2O_SOLVER_CSPARSE_EXTENSION csparse_extension) 88 | FIND_G2O_LIBRARY(G2O_SOLVER_DENSE solver_dense) 89 | FIND_G2O_LIBRARY(G2O_SOLVER_PCG solver_pcg) 90 | FIND_G2O_LIBRARY(G2O_SOLVER_SLAM2D_LINEAR solver_slam2d_linear) 91 | FIND_G2O_LIBRARY(G2O_SOLVER_STRUCTURE_ONLY solver_structure_only) 92 | FIND_G2O_LIBRARY(G2O_SOLVER_EIGEN solver_eigen) 93 | 94 | # Find the predefined types 95 | FIND_G2O_LIBRARY(G2O_TYPES_DATA types_data) 96 | FIND_G2O_LIBRARY(G2O_TYPES_ICP types_icp) 97 | FIND_G2O_LIBRARY(G2O_TYPES_SBA types_sba) 98 | FIND_G2O_LIBRARY(G2O_TYPES_SCLAM2D types_sclam2d) 99 | FIND_G2O_LIBRARY(G2O_TYPES_SIM3 types_sim3) 100 | FIND_G2O_LIBRARY(G2O_TYPES_SLAM2D types_slam2d) 101 | FIND_G2O_LIBRARY(G2O_TYPES_SLAM3D types_slam3d) 102 | 103 | # G2O solvers declared found if we found at least one solver 104 | SET(G2O_SOLVERS_FOUND "NO") 105 | IF(G2O_SOLVER_CHOLMOD OR G2O_SOLVER_CSPARSE OR G2O_SOLVER_DENSE OR G2O_SOLVER_PCG OR G2O_SOLVER_SLAM2D_LINEAR OR G2O_SOLVER_STRUCTURE_ONLY OR G2O_SOLVER_EIGEN) 106 | SET(G2O_SOLVERS_FOUND "YES") 107 | ENDIF(G2O_SOLVER_CHOLMOD OR G2O_SOLVER_CSPARSE OR G2O_SOLVER_DENSE OR G2O_SOLVER_PCG OR G2O_SOLVER_SLAM2D_LINEAR OR G2O_SOLVER_STRUCTURE_ONLY OR G2O_SOLVER_EIGEN) 108 | 109 | # G2O itself declared found if we found the core libraries and at least one solver 110 | SET(G2O_FOUND "NO") 111 | IF(G2O_STUFF_LIBRARY AND G2O_CORE_LIBRARY AND G2O_INCLUDE_DIR AND G2O_SOLVERS_FOUND) 112 | SET(G2O_FOUND "YES") 113 | ENDIF(G2O_STUFF_LIBRARY AND G2O_CORE_LIBRARY AND G2O_INCLUDE_DIR AND G2O_SOLVERS_FOUND) 114 | -------------------------------------------------------------------------------- /config/config/config.yaml: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------------------------------- 2 | # PLSLAM parameters 3 | # ----------------------------------------------------------------------------------------------------- 4 | 5 | fast_matching : true 6 | mutithread_slam : true 7 | has_refinement : false 8 | 9 | # lm numbers and errors 10 | min_lm_obs : 5 11 | max_common_fts_kf : 0.9 12 | 13 | max_kf_epip_p : 1.0 14 | max_kf_epip_l : 1.0 15 | 16 | max_lm_3d_err : 0.1 17 | max_lm_dir_err : 0.1 18 | max_point_point_error : 0.1 19 | max_point_line_error : 0.1 20 | max_dir_line_error : 0.1 21 | 22 | # graphs parameters 23 | min_lm_ess_graph : 150 24 | min_lm_cov_graph : 75 25 | min_kf_local_map : 3 26 | 27 | # LBA 28 | lambda_lba_lm : 0.00001 # (if auto, this is the initial tau) 29 | lambda_lba_k : 10.0 30 | max_iters_lba : 15 31 | 32 | # Loop closure 33 | vocabulary_p : "/home/ruben/code/pl-slam-dev/vocabulary/mapir_orb.yml" 34 | vocabulary_l : "/home/ruben/code/pl-slam-dev/vocabulary/mapir_lsd.yml" 35 | 36 | lc_mat : 0.5 37 | lc_res : 1.5 38 | lc_unc : 0.01 39 | lc_inl : 0.3 40 | lc_trs : 1.5 41 | lc_rot : 35.0 42 | 43 | max_iters_pgo : 100 44 | lc_kf_dist : 50 45 | lc_kf_max_dist : 50 46 | lc_nkf_closest : 4 47 | lc_inlier_ratio : 30.0 48 | 49 | min_pt_matches : 10 50 | min_ls_matches : 6 51 | 52 | 53 | 54 | 55 | 56 | 57 | # ----------------------------------------------------------------------------------------------------- 58 | # StVO parameters 59 | # ----------------------------------------------------------------------------------------------------- 60 | # kf decision (SLAM) parameters 61 | min_entropy_ratio : 0.85 62 | max_kf_t_dist : 5.0 63 | max_kf_r_dist : 15.0 64 | 65 | # StVO-PL options 66 | # ----------------------------------------------------------------------------------------------------- 67 | has_points : true # true if using points 68 | has_lines : true # true if using line segments 69 | use_fld_lines : false # true if using FLD detector 70 | lr_in_parallel : true # true if detecting and matching features in parallel 71 | pl_in_parallel : true # true if detecting points and line segments in parallel 72 | best_lr_matches : true # true if double-checking the matches between the two images 73 | adaptative_fast : true # true if using adaptative fast_threshold 74 | use_motion_model : false # true if using constant motion model 75 | 76 | # Tracking parameters 77 | # ----------------------------------------------------------------------------------------------------- 78 | # Point features 79 | max_dist_epip : 1.0 # max. epipolar distance in pixels 80 | min_disp : 1.0 # min. disparity (avoid points in the infinite) 81 | min_ratio_12_p : 0.75 # min. ratio between the first and second best matches 82 | 83 | # Line segment features 84 | line_sim_th : 0.75 # threshold for cosine similarity 85 | stereo_overlap_th : 0.85 86 | f2f_overlap_th : 0.85 87 | min_line_length : 0.05 # min. line length (relative to img size) 88 | line_horiz_th : 1.0 # parameter to avoid horizontal lines (pixels) 89 | min_ratio_12_l : 0.75 # parameter to avoid outliers in line matching 90 | ls_min_disp_ratio : 0.7 # min ratio between min(disp)/max(disp) for a LS 91 | 92 | # Adaptative FAST parameters 93 | fast_min_th : 5 # min. value for FAST threshold 94 | fast_max_th : 50 # max. value for FAST threshold 95 | fast_inc_th : 5 # base increment for the FAST threshold 96 | fast_feat_th : 50 # base number of features to increase/decrease FAST threshold 97 | fast_err_th : 0.5 # threshold for the optimization error 98 | 99 | # Optimization parameters 100 | # ----------------------------------------------------------------------------------------------------- 101 | homog_th : 1e-7 # avoid points in the infinite 102 | min_features : 10 # min. number of features to perform StVO 103 | max_iters : 5 # max. number of iterations in the first stage of the optimization 104 | max_iters_ref : 10 # max. number of iterations in the refinement stage 105 | min_error : 1e-7 # min. error to stop the optimization 106 | min_error_change : 1e-7 # min. error change to stop the optimization 107 | inlier_k : 4.0 # factor to discard outliers before the refinement stage 108 | 109 | # Feature detection parameters 110 | # ----------------------------------------------------------------------------------------------------- 111 | matching_strategy : 3 112 | matching_s_ws : 10 113 | matching_f2f_ws : 3 114 | 115 | # ORB detector 116 | orb_nfeatures : 1200 117 | orb_scale_factor : 1.2 118 | orb_nlevels : 1 119 | orb_edge_th : 19 120 | orb_wta_k : 2 # was set to 4 121 | orb_score : 1 # 0 - HARRIS | 1 - FAST 122 | orb_patch_size : 31 123 | orb_fast_th : 20 # default FAST threshold 124 | # LSD parameters 125 | lsd_nfeatures : 300 # set to 0 if keeping all lines 126 | lsd_refine : 0 127 | lsd_scale : 1.2 128 | lsd_sigma_scale : 0.6 129 | lsd_quant : 2.0 130 | lsd_ang_th : 22.5 131 | lsd_log_eps : 1.0 132 | lsd_density_th : 0.6 133 | lsd_n_bins : 1024 134 | 135 | 136 | 137 | 138 | -------------------------------------------------------------------------------- /config/config/config_euroc.yaml: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------------------------------- 2 | # StVO parameters 3 | # ----------------------------------------------------------------------------------------------------- 4 | # kf decision (SLAM) parameters 5 | min_entropy_ratio : 0.85 6 | max_kf_t_dist : 5.0 7 | max_kf_r_dist : 15.0 8 | 9 | # StVO-PL options 10 | # ----------------------------------------------------------------------------------------------------- 11 | has_points : true # true if using points 12 | has_lines : true # true if using line segments 13 | use_fld_lines : false # true if using FLD detector 14 | lr_in_parallel : true # true if detecting and matching features in parallel 15 | pl_in_parallel : true # true if detecting points and line segments in parallel 16 | best_lr_matches : true # true if double-checking the matches between the two images 17 | adaptative_fast : true # true if using adaptative fast_threshold 18 | use_motion_model : false # true if using constant motion model 19 | 20 | # Tracking parameters 21 | # ----------------------------------------------------------------------------------------------------- 22 | # Point features 23 | max_dist_epip : 1.0 # max. epipolar distance in pixels 24 | min_disp : 1.0 # min. disparity (avoid points in the infinite) 25 | min_ratio_12_p : 0.9 # min. ratio between the first and second best matches 26 | 27 | # Line segment features 28 | line_sim_th : 0.75 # threshold for cosine similarity 29 | stereo_overlap_th : 0.75 30 | f2f_overlap_th : 0.75 31 | min_line_length : 0.025 # min. line length (relative to img size) 32 | line_horiz_th : 0.1 # parameter to avoid horizontal lines (pixels) 33 | min_ratio_12_l : 0.9 # parameter to avoid outliers in line matching 34 | ls_min_disp_ratio : 0.7 # min ratio between min(disp)/max(disp) for a LS 35 | 36 | # Adaptative FAST parameters 37 | fast_min_th : 5 # min. value for FAST threshold 38 | fast_max_th : 50 # max. value for FAST threshold 39 | fast_inc_th : 5 # base increment for the FAST threshold 40 | fast_feat_th : 50 # base number of features to increase/decrease FAST threshold 41 | fast_err_th : 0.5 # threshold for the optimization error 42 | 43 | # Optimization parameters 44 | # ----------------------------------------------------------------------------------------------------- 45 | homog_th : 1e-7 # avoid points in the infinite 46 | min_features : 10 # min. number of features to perform StVO 47 | max_iters : 5 # max. number of iterations in the first stage of the optimization 48 | max_iters_ref : 10 # max. number of iterations in the refinement stage 49 | min_error : 1e-7 # min. error to stop the optimization 50 | min_error_change : 1e-7 # min. error change to stop the optimization 51 | inlier_k : 4.0 # factor to discard outliers before the refinement stage 52 | 53 | # Feature detection parameters 54 | # ----------------------------------------------------------------------------------------------------- 55 | matching_strategy : 3 56 | matching_s_ws : 10 57 | matching_f2f_ws : 3 58 | 59 | # ORB detector 60 | orb_nfeatures : 800 61 | orb_scale_factor : 1.2 62 | orb_nlevels : 4 63 | orb_edge_th : 19 64 | orb_wta_k : 2 # was set to 4 65 | orb_score : 1 # 0 - HARRIS | 1 - FAST 66 | orb_patch_size : 31 67 | orb_fast_th : 20 # default FAST threshold 68 | # LSD parameters 69 | lsd_nfeatures : 300 # set to 0 if keeping all lines 70 | lsd_refine : 0 71 | lsd_scale : 1.2 72 | lsd_sigma_scale : 0.6 73 | lsd_quant : 2.0 74 | lsd_ang_th : 22.5 75 | lsd_log_eps : 1.0 76 | lsd_density_th : 0.6 77 | lsd_n_bins : 1024 78 | 79 | 80 | # ----------------------------------------------------------------------------------------------------- 81 | # PLSLAM parameters 82 | # ----------------------------------------------------------------------------------------------------- 83 | 84 | fast_matching : true 85 | has_refinement : false 86 | mutithread_slam : true 87 | 88 | # lm numbers and errors 89 | min_lm_obs : 5 90 | max_common_fts_kf : 0.9 91 | 92 | max_kf_epip_p : 1.0 93 | max_kf_epip_l : 1.0 94 | 95 | max_lm_3d_err : 0.1 96 | max_lm_dir_err : 0.1 97 | max_point_point_error : 0.1 98 | max_point_line_error : 0.1 99 | max_dir_line_error : 0.1 100 | 101 | # graphs parameters 102 | min_lm_ess_graph : 150 103 | min_lm_cov_graph : 75 104 | min_kf_local_map : 3 105 | 106 | # LBA 107 | lambda_lba_lm : 0.00001 # (if auto, this is the initial tau) 108 | lambda_lba_k : 10.0 109 | max_iters_lba : 15 110 | 111 | # Loop closure 112 | vocabulary_p : "/home/hc/桌面/pl-slam-master/vocabulary/mapir_orb.yml" 113 | vocabulary_l : "/home/hc/桌面/pl-slam-master/vocabulary/mapir_lsd.yml" 114 | 115 | lc_mat : 0.5 116 | lc_res : 1.5 117 | lc_unc : 0.01 118 | lc_inl : 0.3 119 | lc_trs : 1.5 120 | lc_rot : 35.0 121 | 122 | max_iters_pgo : 100 123 | lc_kf_dist : 50 124 | lc_kf_max_dist : 50 125 | lc_nkf_closest : 4 126 | lc_inlier_ratio : 30.0 127 | 128 | min_pt_matches : 10 129 | min_ls_matches : 6 130 | -------------------------------------------------------------------------------- /config/config/config_fast.yaml: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------------------------------- 2 | # StVO parameters 3 | # ----------------------------------------------------------------------------------------------------- 4 | # kf decision (SLAM) parameters 5 | min_entropy_ratio : 0.85 6 | max_kf_t_dist : 5.0 7 | max_kf_r_dist : 15.0 8 | 9 | # StVO-PL options 10 | # ----------------------------------------------------------------------------------------------------- 11 | has_points : true # true if using points 12 | has_lines : true # true if using line segments 13 | use_fld_lines : false # true if using FLD detector 14 | lr_in_parallel : true # true if detecting and matching features in parallel 15 | pl_in_parallel : true # true if detecting points and line segments in parallel 16 | best_lr_matches : true # true if double-checking the matches between the two images 17 | adaptative_fast : true # true if using adaptative fast_threshold 18 | use_motion_model : false # true if using constant motion model 19 | 20 | # Tracking parameters 21 | # ----------------------------------------------------------------------------------------------------- 22 | # Point features 23 | max_dist_epip : 1.0 # max. epipolar distance in pixels 24 | min_disp : 1.0 # min. disparity (avoid points in the infinite) 25 | min_ratio_12_p : 0.75 # min. ratio between the first and second best matches 26 | 27 | # Line segment features 28 | line_sim_th : 0.75 # threshold for cosine similarity 29 | stereo_overlap_th : 0.85 30 | f2f_overlap_th : 0.85 31 | min_line_length : 0.05 # min. line length (relative to img size) 32 | line_horiz_th : 1.0 # parameter to avoid horizontal lines (pixels) 33 | min_ratio_12_l : 0.75 # parameter to avoid outliers in line matching 34 | ls_min_disp_ratio : 0.7 # min ratio between min(disp)/max(disp) for a LS 35 | 36 | # Adaptative FAST parameters 37 | fast_min_th : 5 # min. value for FAST threshold 38 | fast_max_th : 50 # max. value for FAST threshold 39 | fast_inc_th : 5 # base increment for the FAST threshold 40 | fast_feat_th : 50 # base number of features to increase/decrease FAST threshold 41 | fast_err_th : 0.5 # threshold for the optimization error 42 | 43 | # Optimization parameters 44 | # ----------------------------------------------------------------------------------------------------- 45 | homog_th : 1e-7 # avoid points in the infinite 46 | min_features : 10 # min. number of features to perform StVO 47 | max_iters : 5 # max. number of iterations in the first stage of the optimization 48 | max_iters_ref : 10 # max. number of iterations in the refinement stage 49 | min_error : 1e-7 # min. error to stop the optimization 50 | min_error_change : 1e-7 # min. error change to stop the optimization 51 | inlier_k : 4.0 # factor to discard outliers before the refinement stage 52 | 53 | # Feature detection parameters 54 | # ----------------------------------------------------------------------------------------------------- 55 | matching_strategy : 3 56 | matching_s_ws : 10 57 | matching_f2f_ws : 3 58 | 59 | # ORB detector 60 | orb_nfeatures : 600 61 | orb_scale_factor : 1.2 62 | orb_nlevels : 1 63 | orb_edge_th : 19 64 | orb_wta_k : 2 # was set to 4 65 | orb_score : 1 # 0 - HARRIS | 1 - FAST 66 | orb_patch_size : 31 67 | orb_fast_th : 20 # default FAST threshold 68 | # LSD parameters 69 | lsd_nfeatures : 100 # set to 0 if keeping all lines 70 | lsd_refine : 0 71 | lsd_scale : 1.2 72 | lsd_sigma_scale : 0.6 73 | lsd_quant : 2.0 74 | lsd_ang_th : 22.5 75 | lsd_log_eps : 1.0 76 | lsd_density_th : 0.6 77 | lsd_n_bins : 1024 78 | 79 | 80 | 81 | 82 | # ----------------------------------------------------------------------------------------------------- 83 | # PLSLAM parameters 84 | # ----------------------------------------------------------------------------------------------------- 85 | 86 | fast_matching : true 87 | has_refinement : false 88 | mutithread_slam : true 89 | 90 | # lm numbers and errors 91 | min_lm_obs : 5 92 | max_common_fts_kf : 0.9 93 | 94 | max_kf_epip_p : 1.0 95 | max_kf_epip_l : 1.0 96 | 97 | max_lm_3d_err : 0.1 98 | max_lm_dir_err : 0.1 99 | max_point_point_error : 0.1 100 | max_point_line_error : 0.1 101 | max_dir_line_error : 0.1 102 | 103 | # graphs parameters 104 | min_lm_ess_graph : 150 105 | min_lm_cov_graph : 75 106 | min_kf_local_map : 3 107 | 108 | # LBA 109 | lambda_lba_lm : 0.00001 # (if auto, this is the initial tau) 110 | lambda_lba_k : 10.0 111 | max_iters_lba : 15 112 | 113 | # Loop closure 114 | vocabulary_p : "/home/ruben/code/pl-slam-dev/vocabulary/mapir_orb.yml" 115 | vocabulary_l : "/home/ruben/code/pl-slam-dev/vocabulary/mapir_lsd.yml" 116 | 117 | lc_mat : 0.5 118 | lc_res : 1.5 119 | lc_unc : 0.01 120 | lc_inl : 0.3 121 | lc_trs : 1.5 122 | lc_rot : 35.0 123 | 124 | max_iters_pgo : 100 125 | lc_kf_dist : 50 126 | lc_kf_max_dist : 50 127 | lc_nkf_closest : 4 128 | lc_inlier_ratio : 30.0 129 | 130 | min_pt_matches : 10 131 | min_ls_matches : 6 132 | 133 | 134 | -------------------------------------------------------------------------------- /config/config/config_kitti.yaml: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------------------------------- 2 | # StVO parameters 3 | # ----------------------------------------------------------------------------------------------------- 4 | # kf decision (SLAM) parameters 5 | min_entropy_ratio : 0.85 6 | max_kf_t_dist : 5.0 7 | max_kf_r_dist : 15.0 8 | 9 | # StVO-PL options 10 | # ----------------------------------------------------------------------------------------------------- 11 | has_points : true # true if using points 12 | has_lines : true # true if using line segments 13 | use_fld_lines : true # true if using FLD detector 14 | 15 | lr_in_parallel : true # true if detecting and matching features in parallel 16 | pl_in_parallel : true # true if detecting points and line segments in parallel 17 | best_lr_matches : true # true if double-checking the matches between the two images 18 | adaptative_fast : true # true if using adaptative fast_threshold 19 | 20 | use_motion_model : false # true if using constant motion model 21 | 22 | # Tracking parameters 23 | # ----------------------------------------------------------------------------------------------------- 24 | # Point feature 25 | max_dist_epip : 0.0 # max. epipolar distance in pixels 26 | min_disp : 1.0 # min. disparity (avoid points in the infinite) 27 | min_ratio_12_p : 0.75 # min. ratio between the first and second best matches 28 | 29 | # Line segment features 30 | line_sim_th : 0.75 # threshold for cosine similarity 31 | stereo_overlap_th : 0.75 32 | f2f_overlap_th : 0.75 33 | min_line_length : 0.025 # min. line length (relative to img size) 34 | line_horiz_th : 0.1 # parameter to avoid horizontal lines (pixels) 35 | min_ratio_12_l : 0.9 # parameter to avoid outliers in line matching 36 | ls_min_disp_ratio : 0.7 # min ratio between min(disp)/max(disp) for a LS 37 | 38 | # Adaptative FAST parameters 39 | fast_min_th : 0 # min. value for FAST threshold 40 | fast_max_th : 50 # max. value for FAST threshold 41 | fast_inc_th : 5 # base increment for the FAST threshold 42 | fast_feat_th : 50 # base number of features to increase/decrease FAST threshold 43 | fast_err_th : 0.5 # threshold for the optimization error 44 | 45 | # Optimization parameters 46 | # ----------------------------------------------------------------------------------------------------- 47 | homog_th : 1e-7 # avoid points in the infinite 48 | min_features : 10 # min. number of features to perform StVO 49 | max_iters : 100 # max. number of iterations in the first stage of the optimization 50 | max_iters_ref : 100 # max. number of iterations in the refinement stage 51 | min_error : 1e-7 # min. error to stop the optimization 52 | min_error_change : 1e-7 # min. error change to stop the optimization 53 | inlier_k : 1.0 # factor to discard outliers before the refinement stage 54 | 55 | # Feature detection parameters 56 | # ----------------------------------------------------------------------------------------------------- 57 | matching_strategy : 0 58 | matching_s_ws : 10 59 | matching_f2f_ws : 3 60 | 61 | # ORB detector 62 | orb_nfeatures : 800 63 | orb_scale_factor : 1.2 64 | orb_nlevels : 4 65 | orb_edge_th : 19 66 | orb_wta_k : 2 # was set to 4 67 | orb_score : 1 # 0 - HARRIS | 1 - FAST 68 | orb_patch_size : 31 69 | orb_fast_th : 20 # default FAST threshold 70 | # LSD parameters 71 | lsd_nfeatures : 100 # set to 0 if keeping all lines 72 | lsd_refine : 0 73 | lsd_scale : 1.2 74 | lsd_sigma_scale : 0.6 75 | lsd_quant : 2.0 76 | lsd_ang_th : 22.5 77 | lsd_log_eps : 1.0 78 | lsd_density_th : 0.6 79 | lsd_n_bins : 1024 80 | 81 | 82 | # ----------------------------------------------------------------------------------------------------- 83 | # PLSLAM parameters 84 | # ----------------------------------------------------------------------------------------------------- 85 | 86 | fast_matching : true 87 | has_refinement : false 88 | mutithread_slam : false 89 | 90 | # lm numbers and errors 91 | min_lm_obs : 4 92 | max_common_fts_kf : 0.9 93 | 94 | max_kf_epip_p : 1.0 95 | max_kf_epip_l : 1.0 96 | 97 | max_lm_3d_err : 0.1 98 | max_lm_dir_err : 0.1 99 | max_point_point_error : 0.1 100 | max_point_line_error : 0.1 101 | max_dir_line_error : 0.1 102 | 103 | # graphs parameters 104 | min_lm_ess_graph : 150 105 | min_lm_cov_graph : 75 106 | min_kf_local_map : 3 107 | 108 | # LBA 109 | lambda_lba_lm : 0.00001 # (if auto, this is the initial tau) 110 | lambda_lba_k : 10.0 111 | max_iters_lba : 15 112 | 113 | # Loop closure 114 | vocabulary_p : "/home/hc/桌面/pl-slam-master/vocabulary/mapir_orb.yml" 115 | vocabulary_l : "/home/hc/桌面/pl-slam-master/vocabulary/mapir_lsd.yml" 116 | 117 | lc_mat : 0.5 118 | lc_res : 1.5 119 | lc_unc : 0.01 120 | lc_inl : 0.3 121 | lc_trs : 1.5 122 | lc_rot : 35.0 123 | 124 | max_iters_pgo : 100 125 | lc_kf_dist : 50 126 | lc_kf_max_dist : 50 127 | lc_nkf_closest : 4 128 | lc_inlier_ratio : 30.0 129 | 130 | min_pt_matches : 10 131 | min_ls_matches : 6 132 | -------------------------------------------------------------------------------- /config/config/config_reduced.yaml: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------------------------------- 2 | # StVO parameters 3 | # ----------------------------------------------------------------------------------------------------- 4 | has_points : true # true if using points 5 | has_lines : true # true if using line segments 6 | lr_in_parallel : true # true if detecting and matching features in parallel 7 | pl_in_parallel : true # true if detecting points and line segments in parallel 8 | # Tracking parameters 9 | # ----------------------------------------------------------------------------------------------------- 10 | min_ratio_12_p : 0.75 # min. ratio between the first and second best matches 11 | min_ratio_12_l : 0.75 # parameter to avoid outliers in line matching 12 | # Optimization parameters 13 | # ----------------------------------------------------------------------------------------------------- 14 | inlier_k : 4.0 # factor to discard outliers before the refinement stage 15 | # Feature detection parameters 16 | # ----------------------------------------------------------------------------------------------------- 17 | # ORB detector 18 | orb_nfeatures : 1200 # number of ORB features to detect 19 | orb_nlevels : 4 # number of pyramid levels 20 | orb_fast_th : 20 # default FAST threshold 21 | # LSD parameters 22 | lsd_nfeatures : 300 # number of LSD lines detected (set to 0 if keeping all lines) 23 | # kf decision (SLAM) parameters 24 | min_entropy_ratio : 0.85 # entropy ratio for detecting when a new KF is needed 25 | 26 | # ----------------------------------------------------------------------------------------------------- 27 | # PLSLAM parameters 28 | # ----------------------------------------------------------------------------------------------------- 29 | fast_matching : false # allow for the fast matching (window-based) of the map features 30 | mutithread_slam : true # if true the system runs with both the VO, LBA and LC in parallel threads 31 | # graphs parameters 32 | min_lm_ess_graph : 150 # minimum number of landmarks for connectivity in Essential graph 33 | min_lm_cov_graph : 75 # minimum number of landmarks for connectivity in Covisibility graph 34 | min_kf_local_map : 3 # min number of landmarks for the local mapping 35 | # Loop closure 36 | vocabulary_p : "/home/ruben/code/pl-slam-dev/vocabulary/mapir_orb.yml" 37 | vocabulary_l : "/home/ruben/code/pl-slam-dev/vocabulary/mapir_lsd.yml" 38 | lc_inl : 0.3 # minimum inlier ratio in relative pose estimation 39 | lc_nkf_closest : 4 # number of KFs closest to the match to consider it as positive 40 | lc_inlier_ratio : 30.0 # inlier ratio to consider or not a loop closure 41 | -------------------------------------------------------------------------------- /config/dataset_params/asusxtion_params.yaml: -------------------------------------------------------------------------------- 1 | cam0: 2 | cam_bl: 1.0 3 | cam_width: 640 4 | cam_height: 480 5 | cam_model: Pinhole 6 | cam_fx: 570.3422241210938 7 | cam_fy: 570.3422241210938 8 | cam_cx: 319.5 9 | cam_cy: 239.5 10 | cam_d0: 0.0 11 | cam_d1: 0.0 12 | cam_d2: 0.0 13 | cam_d3: 0.0 14 | images_subfolder_l: image_l/ 15 | images_subfolder_r: image_r/ 16 | -------------------------------------------------------------------------------- /config/dataset_params/dataset_params.yaml: -------------------------------------------------------------------------------- 1 | cam0: 2 | cam_cx: 601.8873000000 3 | cam_cy: 183.1104000000 4 | cam_d0: 0.0 5 | cam_d1: 0.0 6 | cam_d2: 0.0 7 | cam_d3: 0.0 8 | cam_fx: 707.0912 9 | cam_fy: 707.0912 10 | cam_bl: 0.54 11 | cam_height: 376 12 | cam_model: Pinhole 13 | cam_width: 1241 14 | rx: 0.0 15 | ry: 0.0 16 | rz: 0.0 17 | tx: 0.0 18 | ty: 0.0 19 | tz: 0.0 20 | images_subfolder_l: image_2/ 21 | images_subfolder_r: image_3/ 22 | -------------------------------------------------------------------------------- /config/dataset_params/euroc_params.yaml: -------------------------------------------------------------------------------- 1 | cam0: 2 | Kl: [458.654, 457.296, 367.215, 248.375] 3 | Kr: [457.587, 456.134, 379.999, 255.238] 4 | Dl: [-0.28340811, 0.07395907, 0.00019359, 1.76187114e-05] 5 | Dr: [-0.28368365, 0.07451284, -0.00010473, -3.55590700e-05] 6 | Rl: [0.9999663475300330, -0.001422739138722922, 0.008079580483432283, 0.001365741834644127, 0.9999741760894847, 0.007055629199258132, -0.008089410156878961, -0.007044357138835809, 0.9999424675829176] 7 | Rr: [0.9999633526194376, -0.003625811871560086, 0.007755443660172947, 0.003680398547259526, 0.9999684752771629, -0.007035845251224894, -0.007729688520722713, 0.007064130529506649, 0.9999451734846440] 8 | cam_bl: 0.110077842 9 | cam_height: 480 10 | cam_model: Pinhole 11 | cam_width: 752 12 | R: [ 9.99997256e-01, 2.31206719e-03, 3.76008102e-04, 13 | -2.31713572e-03, 9.99898049e-01, 1.40898358e-02, 14 | -3.43393121e-04, -1.40906685e-02, 9.99900663e-01 ] 15 | t: [ -0.11007381, 0.00039912, -0.0008537 ] 16 | images_subfolder_l: cam0/data/ 17 | images_subfolder_r: cam1/data/ 18 | -------------------------------------------------------------------------------- /config/dataset_params/kitti00-02.yaml: -------------------------------------------------------------------------------- 1 | cam0: 2 | cam_cx: 607.1928 3 | cam_cy: 185.2157 4 | cam_d0: 0.0 5 | cam_d1: 0.0 6 | cam_d2: 0.0 7 | cam_d3: 0.0 8 | cam_fx: 718.856 9 | cam_fy: 718.856 10 | cam_bl: 0.537165719 11 | cam_height: 376 12 | cam_model: Pinhole 13 | cam_width: 1241 14 | rx: 0.0 15 | ry: 0.0 16 | rz: 0.0 17 | tx: 0.0 18 | ty: 0.0 19 | tz: 0.0 20 | images_subfolder_l: image_2/ 21 | images_subfolder_r: image_3/ 22 | -------------------------------------------------------------------------------- /config/dataset_params/kitti03.yaml: -------------------------------------------------------------------------------- 1 | cam0: 2 | cam_cx: 609.5593 3 | cam_cy: 172.854 4 | cam_d0: 0.0 5 | cam_d1: 0.0 6 | cam_d2: 0.0 7 | cam_d3: 0.0 8 | cam_fx: 721.5377 9 | cam_fy: 721.5377 10 | cam_bl: 0.537150588 11 | cam_height: 375 12 | cam_model: Pinhole 13 | cam_width: 1242 14 | rx: 0.0 15 | ry: 0.0 16 | rz: 0.0 17 | tx: 0.0 18 | ty: 0.0 19 | tz: 0.0 20 | images_subfolder_l: image_2/ 21 | images_subfolder_r: image_3/ 22 | -------------------------------------------------------------------------------- /config/dataset_params/kitti04-10.yaml: -------------------------------------------------------------------------------- 1 | cam0: 2 | cam_cx: 601.8873 3 | cam_cy: 183.1104 4 | cam_d0: 0.0 5 | cam_d1: 0.0 6 | cam_d2: 0.0 7 | cam_d3: 0.0 8 | cam_fx: 707.0912 9 | cam_fy: 707.0912 10 | cam_bl: 0.537150653 11 | cam_height: 370 12 | cam_model: Pinhole 13 | cam_width: 1226 14 | rx: 0.0 15 | ry: 0.0 16 | rz: 0.0 17 | tx: 0.0 18 | ty: 0.0 19 | tz: 0.0 20 | images_subfolder_l: image_2/ 21 | images_subfolder_r: image_3/ 22 | -------------------------------------------------------------------------------- /config/dataset_params/perceptin_params.yaml: -------------------------------------------------------------------------------- 1 | cam0: 2 | Kl: [436.74812357841103, 433.86322279759912, 312.91964494989088, 229.11948801387757] 3 | Kr: [442.68650063581009, 439.32829876133417, 316.70314700945681, 237.35428785057542] 4 | cam_bl: 0.065 5 | cam_width: 640 6 | cam_height: 480 7 | cam_model: Pinhole 8 | Rl: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0 ] 9 | Rr: [ 0.99998826205868663, -0.0038547708511774536, -0.0029353852442241856, 0.0038411041866586192, 0.99998182398315805, -0.0046473241702847112, 0.0029532462603597126, 0.0046359944997152831, 0.99998489283164882] 10 | Dl: [-0.35672321427959869, 0.10329057327105647, 0.0, 0.0 ] 11 | Dr: [-0.35616361614027825, 0.10277417306254764, 0.0, 0.0 ] 12 | R: [ 0.99998826205868707184, 0.00384110418665848177, 0.00295324626036013544, 13 | -0.00385477085117759063, 0.99998182398315793584, 0.00463599449971529177, 14 | -0.00293538524422376403, -0.00464732417028469996, 0.99998489283164893049 ] 15 | t: [ -0.06445734907815808823, 0.00033933833228201360, 0.00007254340573538721 ] 16 | images_subfolder_l: image_l/ 17 | images_subfolder_r: image_r/ 18 | -------------------------------------------------------------------------------- /config/scene_config.ini: -------------------------------------------------------------------------------- 1 | [Scene] 2 | hasGT = true 3 | hasComparison = true 4 | hasText = false 5 | hasAxes = true 6 | hasLegend = false 7 | hasHelp = false 8 | hasImg = true 9 | hasLines = false 10 | hasPoints = false 11 | isKitti = true 12 | sazim = -90.0 13 | selev = 0.0 14 | szoom = 200.0 15 | sfrust = 0.5 16 | -------------------------------------------------------------------------------- /config/scene_config_indoor.ini: -------------------------------------------------------------------------------- 1 | [Scene] 2 | hasGT = true 3 | hasComparison = true 4 | hasText = false 5 | hasAxes = true 6 | hasLegend = false 7 | hasHelp = false 8 | hasImg = true 9 | hasLines = true 10 | hasPoints = true 11 | isKitti = true 12 | szoom = 10.0 13 | sfrust = 0.06 14 | sbb = 1.0 15 | -------------------------------------------------------------------------------- /g2o_types/g2o_types.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by hc on 2020/4/2. 3 | // 4 | 5 | -------------------------------------------------------------------------------- /include/keyFrame.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | ** Stereo VO and SLAM by combining point and line segment features ** 3 | ****************************************************************************** 4 | ** ** 5 | ** Copyright(c) 2016-2018, Ruben Gomez-Ojeda, University of Malaga ** 6 | ** Copyright(c) 2016-2018, David Zuñiga-Noël, University of Malaga ** 7 | ** Copyright(c) 2016-2018, MAPIR group, University of Malaga ** 8 | ** ** 9 | ** This program is free software: you can redistribute it and/or modify ** 10 | ** it under the terms of the GNU General Public License (version 3) as ** 11 | ** published by the Free Software Foundation. ** 12 | ** ** 13 | ** This program is distributed in the hope that it will be useful, but ** 14 | ** WITHOUT ANY WARRANTY; without even the implied warranty of ** 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** 16 | ** GNU General Public License for more details. ** 17 | ** ** 18 | ** You should have received a copy of the GNU General Public License ** 19 | ** along with this program. If not, see . ** 20 | ** ** 21 | *****************************************************************************/ 22 | 23 | #pragma once 24 | #include 25 | #include 26 | #include 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | #include 36 | #include 37 | #include 38 | 39 | using namespace cv; 40 | using namespace std; 41 | using namespace Eigen; 42 | using namespace StVO; 43 | 44 | typedef Matrix Vector6d; 45 | typedef Matrix Matrix6d; 46 | 47 | namespace PLSLAM{ 48 | 49 | class KeyFrame 50 | { 51 | 52 | public: 53 | 54 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 55 | 56 | KeyFrame() { } 57 | KeyFrame( const StVO::StereoFrame* sf ); 58 | KeyFrame( const StVO::StereoFrame* sf, int kf_idx_ ); 59 | ~KeyFrame(); 60 | 61 | Mat plotKeyFrame(); 62 | 63 | bool local; 64 | 65 | int f_idx; 66 | string img_name; 67 | 68 | int kf_idx; 69 | Matrix4d T_kf_w; 70 | Vector6d x_kf_w; 71 | Matrix6d xcov_kf_w; 72 | 73 | DBoW2::BowVector descDBoW_P, descDBoW_L; 74 | 75 | StVO::StereoFrame* stereo_frame; 76 | 77 | 78 | 79 | }; 80 | 81 | } 82 | -------------------------------------------------------------------------------- /include/mapFeatures.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | ** Stereo VO and SLAM by combining point and line segment features ** 3 | ****************************************************************************** 4 | ** ** 5 | ** Copyright(c) 2016-2018, Ruben Gomez-Ojeda, University of Malaga ** 6 | ** Copyright(c) 2016-2018, David Zuñiga-Noël, University of Malaga ** 7 | ** Copyright(c) 2016-2018, MAPIR group, University of Malaga ** 8 | ** ** 9 | ** This program is free software: you can redistribute it and/or modify ** 10 | ** it under the terms of the GNU General Public License (version 3) as ** 11 | ** published by the Free Software Foundation. ** 12 | ** ** 13 | ** This program is distributed in the hope that it will be useful, but ** 14 | ** WITHOUT ANY WARRANTY; without even the implied warranty of ** 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** 16 | ** GNU General Public License for more details. ** 17 | ** ** 18 | ** You should have received a copy of the GNU General Public License ** 19 | ** along with this program. If not, see . ** 20 | ** ** 21 | *****************************************************************************/ 22 | 23 | #pragma once 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | using namespace cv; 31 | using namespace std; 32 | using namespace Eigen; 33 | 34 | typedef Matrix Vector5i; 35 | typedef Matrix Vector6d; 36 | typedef Matrix Matrix6d; 37 | 38 | namespace PLSLAM{ 39 | 40 | class MapPoint 41 | { 42 | 43 | public: 44 | 45 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 46 | 47 | MapPoint() { } 48 | MapPoint(int idx_, Vector3d point3D_, Mat desc_, int kf_obs_, Vector2d obs_, Vector3d dir_, double sigma2_ = 1.f); 49 | ~MapPoint() { } 50 | 51 | void addMapPointObservation(Mat desc_, int kf_obs_, Vector2d obs_, Vector3d dir_, double sigma2_ = 1.f); 52 | void updateAverageDescDir(); 53 | 54 | int idx; 55 | 56 | bool inlier; 57 | bool local; 58 | Vector3d point3D; 59 | Vector3d med_obs_dir; 60 | Mat med_desc; 61 | 62 | vector desc_list; // list with the descriptor of each observation 63 | vector obs_list; // list with the coordinates of each observation 64 | vector dir_list; // list with the direction unit vector of each observation 65 | vector kf_obs_list; // list with KF index where the feature has been observed 66 | vector sigma_list; // list with the sigma scale of each observation 67 | 68 | }; 69 | 70 | class MapLine 71 | { 72 | 73 | public: 74 | 75 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 76 | 77 | MapLine() { } 78 | MapLine(int idx_, Vector6d line3D_, Mat desc_, int kf_obs_, Vector3d obs_, Vector3d dir_, Vector4d pts_, double sigma2_ = 1.f); 79 | //pluker 80 | MapLine(int idx_, Vector6d NDw_, Mat desc_, int kf_obs_, Vector4d obs_, double sigma2_ = 1.f); 81 | void addMapLineObservation(Mat desc_, int kf_obs_, Vector4d obs_, double sigma2_ = 1.f); 82 | 83 | 84 | ~MapLine() { } 85 | 86 | void addMapLineObservation(Mat desc_, int kf_obs_, Vector3d obs_, Vector3d dir_, Vector4d pts_, double sigma2_ = 1.f); 87 | void updateAverageDescDir(); 88 | 89 | int idx; 90 | 91 | bool inlier; 92 | bool local; 93 | Vector6d line3D; // 3D endpoints of the line segment 94 | Vector3d med_obs_dir; 95 | Mat med_desc; 96 | 97 | vector desc_list; // list with the descriptor of each observation 98 | vector obs_list; // list with the coordinates of each observation ( 2D line equation, normalized by sqrt(lx2+ly2) ) 99 | vector pts_list; // list with the coordinates of each endpoint (four coordinates) 100 | vector dir_list; // list with the direction unit vector of each observation (middle point) 101 | vector kf_obs_list; // list with KF index where the feature has been observed 102 | vector sigma_list; // list with the sigma scale of each observation 103 | 104 | //pluker 105 | Vector6d NDw; // pluker coord in the world frame 106 | Vector4d orthNDw; //orth coord for optimize 107 | vector NDw_obs_list; 108 | static Vector4d changePlukerToOrth(const Vector6d& plukerLine); 109 | static Vector6d changeOrthToPluker(const Vector4d& orthLine ); 110 | static Matrix3d getOrhtRFromPluker(const Vector6d& plukerLine); 111 | static Matrix2d getOrthWFromPluker(const Vector6d& plukerLine); 112 | static Matrix jacobianFromPlukerToOrth(const Matrix3d& u, const Matrix2d& w); 113 | 114 | //debug 115 | int first_kf_id; 116 | Matrix4d first_kf_pose; 117 | Vector4d first_kf_obs; 118 | double error; 119 | Vector6d first_NDw; 120 | 121 | 122 | }; 123 | 124 | } 125 | -------------------------------------------------------------------------------- /include/slamScene.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | ** Stereo VO and SLAM by combining point and line segment features ** 3 | ****************************************************************************** 4 | ** ** 5 | ** Copyright(c) 2016-2018, Ruben Gomez-Ojeda, University of Malaga ** 6 | ** Copyright(c) 2016-2018, David Zuñiga-Noël, University of Malaga ** 7 | ** Copyright(c) 2016-2018, MAPIR group, University of Malaga ** 8 | ** ** 9 | ** This program is free software: you can redistribute it and/or modify ** 10 | ** it under the terms of the GNU General Public License (version 3) as ** 11 | ** published by the Free Software Foundation. ** 12 | ** ** 13 | ** This program is distributed in the hope that it will be useful, but ** 14 | ** WITHOUT ANY WARRANTY; without even the implied warranty of ** 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** 16 | ** GNU General Public License for more details. ** 17 | ** ** 18 | ** You should have received a copy of the GNU General Public License ** 19 | ** along with this program. If not, see . ** 20 | ** ** 21 | *****************************************************************************/ 22 | 23 | #include 24 | using namespace std; 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | using namespace mrpt; 32 | using namespace mrpt::gui; 33 | using namespace mrpt::poses; 34 | using namespace mrpt::utils; 35 | using namespace mrpt::math; 36 | using namespace mrpt::opengl; 37 | 38 | #include 39 | using namespace cv; 40 | 41 | #include 42 | using namespace Eigen; 43 | 44 | #include 45 | 46 | namespace PLSLAM{ 47 | 48 | class slamScene{ 49 | 50 | public: 51 | 52 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 53 | 54 | slamScene(); 55 | slamScene(string configFile); 56 | ~slamScene(); 57 | 58 | void initializeScene(Matrix4d x_0); 59 | void initViewports(int W, int H); 60 | bool updateScene(); 61 | bool updateSceneVO( Matrix4d T_last_kf ); 62 | bool updateScene(const MapHandler* map); 63 | bool updateSceneSafe(const MapHandler* map); 64 | void updateSceneGraphs(const MapHandler* map); 65 | 66 | void setText(int frame_, float time_, int nPoints_, int nPointsH_, int nLines_, int nLinesH_); 67 | void setText(int frame_, float time_, int nPoints_, int nLines_ ); 68 | void setPose(Matrix4d x_); 69 | void setGT(Matrix4d xgt_); 70 | void setComparison(Matrix4d xcomp_); 71 | void setImage(const Mat &image_); 72 | void setImage(const string &image_); 73 | void setLegend(); 74 | void setHelp(); 75 | void setPoints(CMatrixFloat pData_); 76 | void setLines(CMatrixFloat lData_); 77 | void setStereoCalibration(Matrix3d K_, float b_); 78 | void setKF(Matrix4d Tfw); 79 | 80 | bool waitUntilClose(); 81 | bool isOpen(); 82 | bool getYPR(float &yaw, float &pitch, float &roll); 83 | bool getPose(Matrix4d &T); 84 | 85 | //private: 86 | 87 | CMatrixDouble getPoseFormat(Matrix4d T); 88 | CMatrixDouble33 getCovFormat(MatrixXd cov_); 89 | CPose3D getPoseXYZ(VectorXd x); 90 | 91 | CDisplayWindow3D* win; 92 | COpenGLScenePtr theScene; 93 | COpenGLViewportPtr image, legend, help; 94 | opengl::CSetOfObjectsPtr bbObj, bbObj1, srefObj, srefObj1, gtObj, srefObjGT, elliObjL, elliObjP; 95 | opengl::CEllipsoidPtr elliObj; 96 | opengl::CFrustumPtr frustObj, frustObj1; 97 | opengl::CAxisPtr axesObj; 98 | 99 | opengl::CSetOfLinesPtr lineObj, lineObj_local, kfsLinesObj, voLinesObj; 100 | opengl::CPointCloudPtr pointObj, pointObj_local; 101 | opengl::CSetOfObjectsPtr kfsObj; 102 | 103 | 104 | float sbb, saxis, srad, sref, sline, sfreq, szoom, selli, selev, sazim, sfrust, slinef; 105 | CVectorDouble v_aux, v_aux_, v_aux1, v_aux1_, v_auxgt, gt_aux_, v_auxgt_; 106 | CPose3D pose, pose_0, pose_gt, pose_ini, ellPose, pose1, change, frustumL_, frustumR_; 107 | Matrix4d x_ini; 108 | mrptKeyModifier kmods; 109 | int key; 110 | CMatrixDouble33 cov3D; 111 | bool hasText, hasCov, hasGT, hasImg, hasLines, hasPoints, hasFrustum, hasComparison, hasLegend, hasHelp, hasAxes, hasTraj, isKitti; 112 | 113 | Matrix4d x, xgt, xcomp; 114 | MatrixXd cov, W; 115 | unsigned int frame, nPoints, nPointsH, nLines, nLinesH; 116 | float time; 117 | string img, img_legend, img_help; 118 | CMatrixFloat lData, pData; 119 | CImage img_mrpt_legend, img_mrpt_image, img_mrpt_help; 120 | 121 | float b, sigmaP, sigmaL, f, cx, cy, bsigmaL, bsigmaP; 122 | 123 | }; 124 | 125 | } 126 | -------------------------------------------------------------------------------- /include2/dataset.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | ** Stereo VO and SLAM by combining point and line segment features ** 3 | ****************************************************************************** 4 | ** ** 5 | ** Copyright(c) 2016-2018, Ruben Gomez-Ojeda, University of Malaga ** 6 | ** Copyright(c) 2016-2018, David Zuñiga-Noël, University of Malaga ** 7 | ** Copyright(c) 2016-2018, MAPIR group, University of Malaga ** 8 | ** ** 9 | ** This program is free software: you can redistribute it and/or modify ** 10 | ** it under the terms of the GNU General Public License (version 3) as ** 11 | ** published by the Free Software Foundation. ** 12 | ** ** 13 | ** This program is distributed in the hope that it will be useful, but ** 14 | ** WITHOUT ANY WARRANTY; without even the implied warranty of ** 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** 16 | ** GNU General Public License for more details. ** 17 | ** ** 18 | ** You should have received a copy of the GNU General Public License ** 19 | ** along with this program. If not, see . ** 20 | ** ** 21 | *****************************************************************************/ 22 | 23 | #pragma once 24 | 25 | //STL 26 | #include 27 | #include 28 | 29 | //OpenCV 30 | #include 31 | 32 | #include "pinholeStereoCamera.h" 33 | 34 | namespace StVO { 35 | 36 | class Dataset { 37 | public: 38 | 39 | // Constructor 40 | Dataset(const std::string &dataset_path, const PinholeStereoCamera &cam, int offset = 0, int nmax = 0, int step = 1); 41 | 42 | // Destrcutor 43 | virtual ~Dataset(); 44 | 45 | // Reads next frame in the dataset sequence, returning true if image was successfully loaded 46 | bool nextFrame(cv::Mat &img_l, cv::Mat &img_r, long double &t); 47 | 48 | // Returns if there are images still available in the sequence 49 | inline bool hasNext(); 50 | 51 | private: 52 | 53 | std::list images_l, images_r; 54 | const PinholeStereoCamera &cam; 55 | std::list img_time; 56 | }; 57 | 58 | } // namespace StVO 59 | 60 | -------------------------------------------------------------------------------- /include2/gridStructure.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | ** Stereo VO and SLAM by combining point and line segment features ** 3 | ****************************************************************************** 4 | ** ** 5 | ** Copyright(c) 2016-2018, Ruben Gomez-Ojeda, University of Malaga ** 6 | ** Copyright(c) 2016-2018, David Zuñiga-Noël, University of Malaga ** 7 | ** Copyright(c) 2016-2018, MAPIR group, University of Malaga ** 8 | ** ** 9 | ** This program is free software: you can redistribute it and/or modify ** 10 | ** it under the terms of the GNU General Public License (version 3) as ** 11 | ** published by the Free Software Foundation. ** 12 | ** ** 13 | ** This program is distributed in the hope that it will be useful, but ** 14 | ** WITHOUT ANY WARRANTY; without even the implied warranty of ** 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** 16 | ** GNU General Public License for more details. ** 17 | ** ** 18 | ** You should have received a copy of the GNU General Public License ** 19 | ** along with this program. If not, see . ** 20 | ** ** 21 | *****************************************************************************/ 22 | 23 | #pragma once 24 | 25 | //STL 26 | #include 27 | #include 28 | #include 29 | #include 30 | 31 | namespace StVO { 32 | 33 | void getLineCoords(double x1, double y1, double x2, double y2, std::list> &line_coords); 34 | 35 | struct GridWindow { 36 | std::pair width, height; 37 | }; 38 | 39 | class GridStructure { 40 | public: 41 | 42 | int rows, cols; 43 | 44 | GridStructure(int rows, int cols); 45 | 46 | ~GridStructure(); 47 | 48 | std::list& at(int x, int y); 49 | 50 | void get(int x, int y, const GridWindow &w, std::unordered_set &indices) const; 51 | 52 | void clear(); 53 | 54 | private: 55 | 56 | std::vector>> grid; 57 | std::list out_of_bounds; 58 | }; 59 | 60 | } // namespace StVO 61 | -------------------------------------------------------------------------------- /include2/lineIterator.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | ** Stereo VO and SLAM by combining point and line segment features ** 3 | ****************************************************************************** 4 | ** ** 5 | ** Copyright(c) 2016-2018, Ruben Gomez-Ojeda, University of Malaga ** 6 | ** Copyright(c) 2016-2018, David Zuñiga-Noël, University of Malaga ** 7 | ** Copyright(c) 2016-2018, MAPIR group, University of Malaga ** 8 | ** ** 9 | ** This program is free software: you can redistribute it and/or modify ** 10 | ** it under the terms of the GNU General Public License (version 3) as ** 11 | ** published by the Free Software Foundation. ** 12 | ** ** 13 | ** This program is distributed in the hope that it will be useful, but ** 14 | ** WITHOUT ANY WARRANTY; without even the implied warranty of ** 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** 16 | ** GNU General Public License for more details. ** 17 | ** ** 18 | ** You should have received a copy of the GNU General Public License ** 19 | ** along with this program. If not, see . ** 20 | ** ** 21 | *****************************************************************************/ 22 | 23 | #pragma once 24 | 25 | //STL 26 | #include 27 | 28 | namespace StVO { 29 | 30 | class LineIterator { 31 | public: 32 | 33 | LineIterator(const double x1_, const double y1_, const double x2_, const double y2_); 34 | 35 | bool getNext(std::pair &pixel); 36 | 37 | private: 38 | 39 | const bool steep; 40 | double x1, y1, x2, y2; 41 | 42 | double dx, dy, error; 43 | 44 | int maxX, ystep; 45 | int y, x; 46 | }; 47 | 48 | } // namespace StVO 49 | -------------------------------------------------------------------------------- /include2/matching.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | ** Stereo VO and SLAM by combining point and line segment features ** 3 | ****************************************************************************** 4 | ** ** 5 | ** Copyright(c) 2016-2018, Ruben Gomez-Ojeda, University of Malaga ** 6 | ** Copyright(c) 2016-2018, David Zuñiga-Noël, University of Malaga ** 7 | ** Copyright(c) 2016-2018, MAPIR group, University of Malaga ** 8 | ** ** 9 | ** This program is free software: you can redistribute it and/or modify ** 10 | ** it under the terms of the GNU General Public License (version 3) as ** 11 | ** published by the Free Software Foundation. ** 12 | ** ** 13 | ** This program is distributed in the hope that it will be useful, but ** 14 | ** WITHOUT ANY WARRANTY; without even the implied warranty of ** 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** 16 | ** GNU General Public License for more details. ** 17 | ** ** 18 | ** You should have received a copy of the GNU General Public License ** 19 | ** along with this program. If not, see . ** 20 | ** ** 21 | *****************************************************************************/ 22 | 23 | #pragma once 24 | 25 | //STL 26 | #include 27 | #include 28 | 29 | //OpenCV 30 | #include 31 | 32 | #include "gridStructure.h" 33 | 34 | namespace StVO { 35 | 36 | typedef std::pair point_2d; 37 | typedef std::pair line_2d; 38 | 39 | inline double dot(const std::pair &a, const std::pair &b) { 40 | return (a.first*b.first + a.second*b.second); 41 | } 42 | 43 | inline void normalize(std::pair &v) { 44 | double magnitude = std::sqrt(dot(v, v)); 45 | 46 | v.first /= magnitude; 47 | v.second /= magnitude; 48 | } 49 | 50 | int matchNNR(const cv::Mat &desc1, const cv::Mat &desc2, float nnr, std::vector &matches_12); 51 | 52 | int match(const cv::Mat &desc1, const cv::Mat &desc2, float nnr, std::vector &matches_12); 53 | 54 | int distance(const cv::Mat &a, const cv::Mat &b); 55 | 56 | //Points 57 | int matchGrid(const std::vector &points1, const cv::Mat &desc1, const GridStructure &grid, const cv::Mat &desc2, const GridWindow &w, std::vector &matches_12); 58 | 59 | //Lines 60 | int matchGrid(const std::vector &lines1, const cv::Mat &desc1, const GridStructure &grid, const cv::Mat &desc2, const std::vector> &directions2, const GridWindow &w, std::vector &matches_12); 61 | 62 | } // namesapce StVO 63 | -------------------------------------------------------------------------------- /include2/pinholeStereoCamera.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | ** Stereo VO and SLAM by combining point and line segment features ** 3 | ****************************************************************************** 4 | ** ** 5 | ** Copyright(c) 2016-2018, Ruben Gomez-Ojeda, University of Malaga ** 6 | ** Copyright(c) 2016-2018, David Zuñiga-Noël, University of Malaga ** 7 | ** Copyright(c) 2016-2018, MAPIR group, University of Malaga ** 8 | ** ** 9 | ** This program is free software: you can redistribute it and/or modify ** 10 | ** it under the terms of the GNU General Public License (version 3) as ** 11 | ** published by the Free Software Foundation. ** 12 | ** ** 13 | ** This program is distributed in the hope that it will be useful, but ** 14 | ** WITHOUT ANY WARRANTY; without even the implied warranty of ** 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** 16 | ** GNU General Public License for more details. ** 17 | ** ** 18 | ** You should have received a copy of the GNU General Public License ** 19 | ** along with this program. If not, see . ** 20 | ** ** 21 | *****************************************************************************/ 22 | 23 | #pragma once 24 | 25 | using namespace std; 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | using namespace cv; 32 | using namespace line_descriptor; 33 | 34 | #include 35 | using namespace Eigen; 36 | 37 | // Pinhole model for a Stereo Camera in an ideal configuration (horizontal) 38 | class PinholeStereoCamera 39 | { 40 | 41 | private: 42 | int width, height; 43 | double fx, fy; 44 | double cx, cy; 45 | double b; 46 | Matrix3d K; 47 | bool dist; 48 | Matrix d; 49 | Mat Kl, Kr, Dl, Dr, Rl, Rr, Pl, Pr, R, t, Q; 50 | Mat undistmap1l, undistmap2l, undistmap1r, undistmap2r; 51 | 52 | //pluker 53 | Matrix3d plukerK; 54 | 55 | public: 56 | 57 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 58 | 59 | PinholeStereoCamera(const std::string ¶ms_file); 60 | 61 | PinholeStereoCamera( int width_, int height_, double fx_, double fy_, double cx_, double cy_, double b_, 62 | double d0 = 0.0, double d1 = 0.0, double d2 = 0.0, double d3 = 0.0, double d4 = 0.0); 63 | PinholeStereoCamera( int width_, int height_, double fx_, double fy_, double cx_, double cy_, double b_, Mat Rl, Mat Rr, 64 | double d0 = 0.0, double d1 = 0.0, double d2 = 0.0, double d3 = 0.0, double d4 = 0.0); 65 | 66 | //PinholeStereoCamera(int width_, int height_, double b_, Mat Kl_, Mat Kr_, Mat Rl_, Mat Rr_, Mat Dl_, Mat Dr_, bool equi ); 67 | PinholeStereoCamera(int width_, int height_, double b_, Mat Kl_, Mat Kr_, Mat R_, Mat t_, Mat Dl_, Mat Dr_, bool equi ); 68 | 69 | ~PinholeStereoCamera(); 70 | 71 | // Image rectification 72 | void rectifyImage( const Mat& img_src, Mat& img_rec) const; 73 | void rectifyImagesLR( const Mat& img_src_l, Mat& img_rec_l, const Mat& img_src_r, Mat& img_rec_r ) const; 74 | 75 | // Proyection and Back-projection 76 | Vector3d backProjection_unit(const double &u, const double &v, const double &disp, double &depth); 77 | Vector3d backProjection(const double &u, const double &v, const double &disp); 78 | Vector2d projection(const Vector3d &P); 79 | Vector3d projectionNH(Vector3d P); 80 | Vector2d nonHomogeneous( Vector3d x); 81 | 82 | // Getters 83 | inline const int getWidth() const { return width; }; 84 | inline const int getHeight() const { return height; }; 85 | inline const Matrix3d& getK() const { return K; }; 86 | inline const double getB() const { return b; }; 87 | inline const Matrix getD() const { return d; }; 88 | inline const double getFx() const { return fx; }; 89 | inline const double getFy() const { return fy; }; 90 | inline const double getCx() const { return cx; }; 91 | inline const double getCy() const { return cy; }; 92 | 93 | inline const Matrix3d& getPlukerK() const { return plukerK; } 94 | 95 | }; 96 | 97 | -------------------------------------------------------------------------------- /include2/stereoFrame.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | ** Stereo VO and SLAM by combining point and line segment features ** 3 | ****************************************************************************** 4 | ** ** 5 | ** Copyright(c) 2016-2018, Ruben Gomez-Ojeda, University of Malaga ** 6 | ** Copyright(c) 2016-2018, David Zuñiga-Noël, University of Malaga ** 7 | ** Copyright(c) 2016-2018, MAPIR group, University of Malaga ** 8 | ** ** 9 | ** This program is free software: you can redistribute it and/or modify ** 10 | ** it under the terms of the GNU General Public License (version 3) as ** 11 | ** published by the Free Software Foundation. ** 12 | ** ** 13 | ** This program is distributed in the hope that it will be useful, but ** 14 | ** WITHOUT ANY WARRANTY; without even the implied warranty of ** 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** 16 | ** GNU General Public License for more details. ** 17 | ** ** 18 | ** You should have received a copy of the GNU General Public License ** 19 | ** along with this program. If not, see . ** 20 | ** ** 21 | *****************************************************************************/ 22 | 23 | #pragma once 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | using namespace std; 31 | 32 | #include 33 | #include 34 | 35 | #include 36 | #include 37 | 38 | #include 39 | #include 40 | using namespace cv; 41 | using namespace line_descriptor; 42 | 43 | #include 44 | using namespace Eigen; 45 | 46 | #include 47 | #include 48 | #include 49 | #include 50 | 51 | #define GRID_ROWS 48 52 | #define GRID_COLS 64 53 | 54 | typedef Matrix Matrix6d; 55 | typedef Matrix Vector6d; 56 | 57 | namespace StVO{ 58 | 59 | class StereoFrame 60 | { 61 | 62 | public: 63 | 64 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW 65 | 66 | StereoFrame(); 67 | StereoFrame(const Mat img_l_, const Mat img_r_, const int idx_, PinholeStereoCamera *cam_, const long double t_ ); 68 | ~StereoFrame(); 69 | 70 | void extractStereoFeatures( double llength_th, int fast_th = 20 ); 71 | void extractRGBDFeatures( double llength_th, int fast_th = 20 ); 72 | 73 | void detectStereoPoints(int fast_th = 20); 74 | void detectPointFeatures( Mat img, vector &points, Mat &pdesc, int fast_th = 20 ); 75 | void matchStereoPoints(vector points_l, vector points_r, Mat &pdesc_l_, Mat pdesc_r, bool initial = false ); 76 | void matchPointFeatures(BFMatcher* bfm, Mat pdesc_1, Mat pdesc_2, vector> &pmatches_12); 77 | 78 | void detectStereoLineSegments(double llength_th); 79 | void detectLineFeatures( Mat img, vector &lines, Mat &ldesc, double min_line_length ); 80 | void matchStereoLines(vector lines_l, vector lines_r, Mat &ldesc_l_, Mat ldesc_r, bool initial = false ); 81 | void matchLineFeatures(BFMatcher* bfm, Mat ldesc_1, Mat ldesc_2, vector> &lmatches_12 ); 82 | void filterLineSegmentDisparity(Vector2d spl, Vector2d epl, Vector2d spr, Vector2d epr , double &disp_s, double &disp_e); 83 | void filterLineSegmentDisparity(double &disp_s, double &disp_e); 84 | 85 | double lineSegmentOverlapStereo( double spl_obs, double epl_obs, double spl_proj, double epl_proj ); 86 | double lineSegmentOverlap( Vector2d spl_obs, Vector2d epl_obs, Vector2d spl_proj, Vector2d epl_proj ); 87 | void pointDescriptorMAD( const vector> matches, double &nn_mad, double &nn12_mad ); 88 | void lineDescriptorMAD( const vector> matches, double &nn_mad, double &nn12_mad ); 89 | 90 | //for pluker 91 | Vector4d pi_from_ppp(Vector3d x1, Vector3d x2, Vector3d x3); 92 | Vector6d pipi_plk( Vector4d pi1, Vector4d pi2); 93 | 94 | Mat plotStereoFrame(); 95 | 96 | int frame_idx; 97 | Mat img_l, img_r; 98 | Matrix4d Tfw; 99 | Matrix4d DT; 100 | 101 | Matrix6d Tfw_cov; 102 | Vector6d Tfw_cov_eig; 103 | double entropy_first; 104 | 105 | Matrix6d DT_cov; 106 | Vector6d DT_cov_eig; 107 | double err_norm; 108 | 109 | vector< PointFeature* > stereo_pt; 110 | vector< LineFeature* > stereo_ls; 111 | 112 | vector points_l, points_r; 113 | vector lines_l, lines_r; 114 | Mat pdesc_l, pdesc_r, ldesc_l, ldesc_r; 115 | 116 | PinholeStereoCamera *cam; 117 | 118 | double inv_width, inv_height; // grid cell 119 | long double t; 120 | }; 121 | 122 | } 123 | -------------------------------------------------------------------------------- /include2/stereoFrameHandler.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | ** Stereo VO and SLAM by combining point and line segment features ** 3 | ****************************************************************************** 4 | ** ** 5 | ** Copyright(c) 2016-2018, Ruben Gomez-Ojeda, University of Malaga ** 6 | ** Copyright(c) 2016-2018, David Zuñiga-Noël, University of Malaga ** 7 | ** Copyright(c) 2016-2018, MAPIR group, University of Malaga ** 8 | ** ** 9 | ** This program is free software: you can redistribute it and/or modify ** 10 | ** it under the terms of the GNU General Public License (version 3) as ** 11 | ** published by the Free Software Foundation. ** 12 | ** ** 13 | ** This program is distributed in the hope that it will be useful, but ** 14 | ** WITHOUT ANY WARRANTY; without even the implied warranty of ** 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** 16 | ** GNU General Public License for more details. ** 17 | ** ** 18 | ** You should have received a copy of the GNU General Public License ** 19 | ** along with this program. If not, see . ** 20 | ** ** 21 | *****************************************************************************/ 22 | 23 | #pragma once 24 | #include 25 | #include 26 | 27 | typedef Matrix Matrix6d; 28 | typedef Matrix Vector6d; 29 | 30 | class StereoFrame; 31 | 32 | namespace StVO{ 33 | 34 | class StereoFrameHandler 35 | { 36 | 37 | public: 38 | 39 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW; 40 | 41 | StereoFrameHandler( PinholeStereoCamera* cam_ ); 42 | ~StereoFrameHandler(); 43 | 44 | void initialize( const Mat img_l_, const Mat img_r_, const int idx_, const long double t_); 45 | void insertStereoPair(const Mat img_l_, const Mat img_r_, const int idx_, const long double t_); 46 | void updateFrame(); 47 | 48 | void f2fTracking(); 49 | void matchF2FPoints(); 50 | void matchF2FLines(); 51 | double f2fLineSegmentOverlap( Vector2d spl_obs, Vector2d epl_obs, Vector2d spl_proj, Vector2d epl_proj ); 52 | 53 | bool isGoodSolution( Matrix4d DT, Matrix6d DTcov, double err ); 54 | void optimizePose(); 55 | void resetOutliers(); 56 | void setAsOutliers(); 57 | 58 | void plotStereoFrameProjerr(Matrix4d DT, int iter); 59 | void plotLeftPair(); 60 | 61 | // adaptative fast 62 | int orb_fast_th; 63 | double llength_th; 64 | 65 | // slam-specific functions 66 | bool needNewKF(); 67 | void currFrameIsKF(); 68 | 69 | //list< boost::shared_ptr > matched_pt; 70 | //list< boost::shared_ptr > matched_ls; 71 | list< PointFeature* > matched_pt; 72 | list< LineFeature* > matched_ls; 73 | 74 | StereoFrame* prev_frame; 75 | StereoFrame* curr_frame; 76 | PinholeStereoCamera *cam; 77 | 78 | int n_inliers, n_inliers_pt, n_inliers_ls; 79 | 80 | // slam-specific variables 81 | bool prev_f_iskf; 82 | double entropy_first_prevKF; 83 | Matrix4d T_prevKF; 84 | Matrix6d cov_prevKF_currF; 85 | int N_prevKF_currF; 86 | 87 | // bool recurse; 88 | 89 | private: 90 | 91 | void prefilterOutliers( Matrix4d DT ); 92 | void removeOutliers( Matrix4d DT ); 93 | void gaussNewtonOptimization(Matrix4d &DT, Matrix6d &DT_cov, double &err_, int max_iters); 94 | void gaussNewtonOptimizationRobust(Matrix4d &DT, Matrix6d &DT_cov, double &err_, int max_iters); 95 | void gaussNewtonOptimizationRobustDebug(Matrix4d &DT, Matrix6d &DT_cov, double &err_, int max_iters); 96 | void levenbergMarquardtOptimization(Matrix4d &DT, Matrix6d &DT_cov, double &err_, int max_iters); 97 | void optimizeFunctions(Matrix4d DT, Matrix6d &H, Vector6d &g, double &e); 98 | void optimizeFunctionsRobust(Matrix4d DT, Matrix6d &H, Vector6d &g, double &e); 99 | void optimizePoseDebug(); 100 | 101 | 102 | //pluker 103 | void optimizeFunctionsUsingPluker(Matrix4d DT, Matrix6d &H, Vector6d &g, double &e); 104 | void gaussNewtonOptimizationforPluker(Matrix4d &DT, Matrix6d &DT_cov, double &err_, int max_iters); 105 | 106 | inline Matrix3d vectorHat(const Vector3d& vec){ 107 | Matrix3d temp; 108 | temp << 0, -vec[2], vec[1], 109 | vec[2], 0, -vec[0], 110 | -vec[1], vec[0], 0; 111 | return temp; 112 | } 113 | 114 | inline Vector6d TransformForPluker(const Matrix4d& T, const Vector6d& vec){ 115 | Matrix6d temp; 116 | temp.setZero(); 117 | temp.block<3,3>(0,0) = T.block<3,3>(0,0); 118 | temp.block<3,3>(0,3) = vectorHat(T.block<3,1>(0,3)) * T.block<3,3>(0,0); 119 | temp.block<3,3>(3,3) = T.block<3,3>(0,0); 120 | 121 | return temp * vec; 122 | } 123 | }; 124 | 125 | } 126 | -------------------------------------------------------------------------------- /include2/timer.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | ** Stereo VO and SLAM by combining point and line segment features ** 3 | ****************************************************************************** 4 | ** ** 5 | ** Copyright(c) 2016-2018, Ruben Gomez-Ojeda, University of Malaga ** 6 | ** Copyright(c) 2016-2018, David Zuñiga-Noël, University of Malaga ** 7 | ** Copyright(c) 2016-2018, MAPIR group, University of Malaga ** 8 | ** ** 9 | ** This program is free software: you can redistribute it and/or modify ** 10 | ** it under the terms of the GNU General Public License (version 3) as ** 11 | ** published by the Free Software Foundation. ** 12 | ** ** 13 | ** This program is distributed in the hope that it will be useful, but ** 14 | ** WITHOUT ANY WARRANTY; without even the implied warranty of ** 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** 16 | ** GNU General Public License for more details. ** 17 | ** ** 18 | ** You should have received a copy of the GNU General Public License ** 19 | ** along with this program. If not, see . ** 20 | ** ** 21 | *****************************************************************************/ 22 | 23 | #pragma once 24 | 25 | //STL 26 | #include 27 | 28 | namespace StVO { 29 | 30 | class Timer { 31 | public: 32 | 33 | static constexpr double SECONDS = 1e-9; 34 | static constexpr double MILLISECONDS = 1e-6; 35 | static constexpr double NANOSECONDS = 1.0; 36 | 37 | Timer(double scale = MILLISECONDS); 38 | virtual ~Timer(); 39 | 40 | void start(); 41 | 42 | double stop(); 43 | 44 | private: 45 | 46 | std::chrono::high_resolution_clock::time_point start_t; 47 | bool started; 48 | double scale; 49 | }; 50 | 51 | } // namespace StVO 52 | -------------------------------------------------------------------------------- /lib/libplslam.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/lib/libplslam.so -------------------------------------------------------------------------------- /result/plucker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/result/plucker.png -------------------------------------------------------------------------------- /result/xyz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/result/xyz.png -------------------------------------------------------------------------------- /src2/featureMatching.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "featureMatching.h" 3 | 4 | //STL 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | //OpenCV 11 | #include 12 | #include 13 | 14 | #include "config.h" 15 | 16 | namespace StVO { 17 | 18 | int matchNNR(const cv::Mat &desc1, const cv::Mat &desc2, float nnr, std::vector &matches_12) { 19 | 20 | int matches = 0; 21 | matches_12.resize(desc1.rows, -1); 22 | 23 | std::vector> matches_; 24 | cv::Ptr bfm = cv::BFMatcher::create(cv::NORM_HAMMING, false); // cross-check 25 | bfm->knnMatch(desc1, desc2, matches_, 2); 26 | 27 | if (desc1.rows != matches_.size()) 28 | throw std::runtime_error("[MapHandler->matchNNR] Different size for matches and descriptors!"); 29 | 30 | for (int idx = 0; idx < desc1.rows; ++idx) { 31 | if (matches_[idx][0].distance < matches_[idx][1].distance * nnr) { 32 | matches_12[idx] = matches_[idx][0].trainIdx; 33 | matches++; 34 | } 35 | } 36 | 37 | return matches; 38 | } 39 | 40 | int match(const cv::Mat &desc1, const cv::Mat &desc2, float nnr, std::vector &matches_12) { 41 | 42 | matches_12.clear(); 43 | if (Config::bestLRMatches()) { 44 | int matches; 45 | std::vector matches_21; 46 | if (Config::lrInParallel()) { 47 | auto match_12 = std::async(std::launch::async, &matchNNR, 48 | std::cref(desc1), std::cref(desc2), nnr, std::ref(matches_12)); 49 | auto match_21 = std::async(std::launch::async, &matchNNR, 50 | std::cref(desc2), std::cref(desc1), nnr, std::ref(matches_21)); 51 | matches = match_12.get(); 52 | match_21.wait(); 53 | } else { 54 | matches = matchNNR(desc1, desc2, nnr, matches_12); 55 | matchNNR(desc2, desc1, nnr, matches_21); 56 | } 57 | 58 | for (int i1 = 0; i1 < matches_12.size(); ++i1) { 59 | int &i2 = matches_12[i1]; 60 | if (i2 >= 0 && matches_21[i2] != i1) { 61 | i2 = -1; 62 | matches--; 63 | } 64 | } 65 | 66 | return matches; 67 | } else 68 | return matchNNR(desc1, desc2, nnr, matches_12); 69 | } 70 | 71 | } // namesapce StVO 72 | -------------------------------------------------------------------------------- /src2/gridStructure.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | ** Stereo VO and SLAM by combining point and line segment features ** 3 | ****************************************************************************** 4 | ** ** 5 | ** Copyright(c) 2016-2018, Ruben Gomez-Ojeda, University of Malaga ** 6 | ** Copyright(c) 2016-2018, David Zuñiga-Noël, University of Malaga ** 7 | ** Copyright(c) 2016-2018, MAPIR group, University of Malaga ** 8 | ** ** 9 | ** This program is free software: you can redistribute it and/or modify ** 10 | ** it under the terms of the GNU General Public License (version 3) as ** 11 | ** published by the Free Software Foundation. ** 12 | ** ** 13 | ** This program is distributed in the hope that it will be useful, but ** 14 | ** WITHOUT ANY WARRANTY; without even the implied warranty of ** 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** 16 | ** GNU General Public License for more details. ** 17 | ** ** 18 | ** You should have received a copy of the GNU General Public License ** 19 | ** along with this program. If not, see . ** 20 | ** ** 21 | *****************************************************************************/ 22 | 23 | #include "gridStructure.h" 24 | 25 | //STL 26 | #include 27 | #include 28 | 29 | #include "lineIterator.h" 30 | 31 | namespace StVO { 32 | 33 | void getLineCoords(double x1, double y1, double x2, double y2, std::list> &line_coords) { 34 | line_coords.clear(); 35 | 36 | LineIterator it(x1, y1, x2, y2); 37 | 38 | std::pair p; 39 | while (it.getNext(p)) 40 | line_coords.push_back(p); 41 | } 42 | 43 | GridStructure::GridStructure(int rows, int cols) 44 | : rows(rows), cols(cols) { 45 | 46 | if (rows <= 0 || cols <= 0) 47 | throw std::runtime_error("[GridStructure] invalid dimension"); 48 | 49 | grid.resize(cols, std::vector>(rows)); 50 | } 51 | 52 | GridStructure::~GridStructure() { 53 | 54 | } 55 | 56 | std::list& GridStructure::at(int x, int y) { 57 | 58 | if (x >= 0 && x < cols && 59 | y >= 0 && y < rows) 60 | return grid[x][y]; 61 | else 62 | return out_of_bounds; 63 | } 64 | 65 | void GridStructure::get(int x, int y, const GridWindow &w, std::unordered_set &indices) const { 66 | 67 | int min_x = std::max(0, x - w.width.first); 68 | int max_x = std::min(cols, x + w.width.second + 1); 69 | 70 | int min_y = std::max(0, y - w.height.first); 71 | int max_y = std::min(rows, y + w.height.second + 1); 72 | 73 | for (int x_ = min_x; x_ < max_x; ++x_) 74 | for (int y_ = min_y; y_ < max_y; ++y_) 75 | indices.insert(grid[x_][y_].begin(), grid[x_][y_].end()); 76 | } 77 | 78 | void GridStructure::clear() { 79 | 80 | for (int x = 0; x < cols; ++x) 81 | for (int y = 0; y < rows; ++y) 82 | grid[x][y].clear(); 83 | } 84 | 85 | } //namesapce StVO 86 | -------------------------------------------------------------------------------- /src2/lineIterator.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | ** Stereo VO and SLAM by combining point and line segment features ** 3 | ****************************************************************************** 4 | ** ** 5 | ** Copyright(c) 2016-2018, Ruben Gomez-Ojeda, University of Malaga ** 6 | ** Copyright(c) 2016-2018, David Zuñiga-Noël, University of Malaga ** 7 | ** Copyright(c) 2016-2018, MAPIR group, University of Malaga ** 8 | ** ** 9 | ** This program is free software: you can redistribute it and/or modify ** 10 | ** it under the terms of the GNU General Public License (version 3) as ** 11 | ** published by the Free Software Foundation. ** 12 | ** ** 13 | ** This program is distributed in the hope that it will be useful, but ** 14 | ** WITHOUT ANY WARRANTY; without even the implied warranty of ** 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** 16 | ** GNU General Public License for more details. ** 17 | ** ** 18 | ** You should have received a copy of the GNU General Public License ** 19 | ** along with this program. If not, see . ** 20 | ** ** 21 | *****************************************************************************/ 22 | 23 | #include "lineIterator.h" 24 | 25 | //STL 26 | #include 27 | #include 28 | 29 | //Implementation of Bresenham's line drawing Algorithm 30 | //Adapted from: https://rosettacode.org/wiki/Bitmap/Bresenham%27s_line_algorithm#C.2B.2B 31 | 32 | namespace StVO { 33 | 34 | LineIterator::LineIterator(const double x1_, const double y1_, const double x2_, const double y2_) 35 | : x1(x1_), y1(y1_), x2(x2_), y2(y2_), steep(std::abs(y2_ - y1_) > std::abs(x2_ - x1_)) { 36 | 37 | if (steep) { 38 | std::swap(x1, y1); 39 | std::swap(x2, y2); 40 | } 41 | 42 | if(x1 > x2) { 43 | std::swap(x1, x2); 44 | std::swap(y1, y2); 45 | } 46 | 47 | dx = x2 - x1; 48 | dy = std::abs(y2 - y1); 49 | 50 | error = dx / 2.0; 51 | ystep = (y1 < y2) ? 1 : -1; 52 | 53 | x = static_cast(x1); 54 | y = static_cast(y1); 55 | 56 | maxX = static_cast(x2); 57 | } 58 | 59 | bool LineIterator::getNext(std::pair &pixel) { 60 | 61 | if (x > maxX) 62 | return false; 63 | 64 | if (steep) 65 | pixel = std::make_pair(y, x); 66 | else 67 | pixel = std::make_pair(x, y); 68 | 69 | error -= dy; 70 | if (error < 0) { 71 | y += ystep; 72 | error += dx; 73 | } 74 | 75 | x++; 76 | return true; 77 | } 78 | 79 | } // namespace StVO 80 | -------------------------------------------------------------------------------- /src2/timer.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | ** Stereo VO and SLAM by combining point and line segment features ** 3 | ****************************************************************************** 4 | ** ** 5 | ** Copyright(c) 2016-2018, Ruben Gomez-Ojeda, University of Malaga ** 6 | ** Copyright(c) 2016-2018, David Zuñiga-Noël, University of Malaga ** 7 | ** Copyright(c) 2016-2018, MAPIR group, University of Malaga ** 8 | ** ** 9 | ** This program is free software: you can redistribute it and/or modify ** 10 | ** it under the terms of the GNU General Public License (version 3) as ** 11 | ** published by the Free Software Foundation. ** 12 | ** ** 13 | ** This program is distributed in the hope that it will be useful, but ** 14 | ** WITHOUT ANY WARRANTY; without even the implied warranty of ** 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** 16 | ** GNU General Public License for more details. ** 17 | ** ** 18 | ** You should have received a copy of the GNU General Public License ** 19 | ** along with this program. If not, see . ** 20 | ** ** 21 | *****************************************************************************/ 22 | 23 | #include "timer.h" 24 | 25 | //STL 26 | #include 27 | #include 28 | 29 | namespace StVO { 30 | 31 | Timer::Timer(double scale) : started(false), scale(scale) { } 32 | Timer::~Timer() { } 33 | 34 | void Timer::start() { 35 | 36 | started = true; 37 | start_t = std::chrono::high_resolution_clock::now(); 38 | } 39 | 40 | double Timer::stop() { 41 | 42 | std::chrono::high_resolution_clock::time_point end_t = std::chrono::high_resolution_clock::now(); 43 | 44 | if (!started) 45 | throw std::logic_error("[Timer] Stop called without previous start"); 46 | 47 | started = false; 48 | std::chrono::duration elapsed_ns = end_t - start_t; 49 | return elapsed_ns.count()*scale; 50 | } 51 | 52 | } // namespace StVO 53 | -------------------------------------------------------------------------------- /vocabulary/voc.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeadReaper-hc/PL-SLAM-plucker/fabef9f73f5ab45f8125ea62a815a5f533e6f7f3/vocabulary/voc.tar.gz --------------------------------------------------------------------------------