diff --git a/.cproject b/.cproject index 9c0b0f80b66e6fd52b9ad948d7afd3f059c3a9fd..de7640655e2ef3d7bc156252969e68d1f5251715 100644 --- a/.cproject +++ b/.cproject @@ -1,11 +1,9 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage"> <storageModule moduleId="org.eclipse.cdt.core.settings"> - <cconfiguration id="cdt.managedbuild.toolchain.gnu.base.727026548"> - <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.727026548" moduleId="org.eclipse.cdt.core.settings" name="Default"> - <externalSettings> - <externalSetting/> - </externalSettings> + <cconfiguration id="cdt.managedbuild.toolchain.gnu.base.1244102678"> + <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.1244102678" moduleId="org.eclipse.cdt.core.settings" name="Default"> + <externalSettings/> <extensions> <extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/> <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> @@ -16,46 +14,42 @@ </extensions> </storageModule> <storageModule moduleId="cdtBuildSystem" version="4.0.0"> - <configuration artifactName="${ProjName}" buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.base.727026548" name="Default" parent="org.eclipse.cdt.build.core.emptycfg"> - <folderInfo id="cdt.managedbuild.toolchain.gnu.base.727026548.1071101131" name="/" resourcePath=""> - <toolChain id="cdt.managedbuild.toolchain.gnu.base.1732291248" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base"> - <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF" id="cdt.managedbuild.target.gnu.platform.base.1640924025" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/> - <builder buildPath="${workspace_loc:/vision_utils}/build" id="cdt.managedbuild.target.gnu.builder.base.1544635012" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/> - <tool id="cdt.managedbuild.tool.gnu.archiver.base.646136846" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/> - <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.433122623" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base"> - <option id="gnu.cpp.compiler.option.include.paths.937784075" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath"> + <configuration buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.base.1244102678" name="Default" parent="org.eclipse.cdt.build.core.emptycfg"> + <folderInfo id="cdt.managedbuild.toolchain.gnu.base.1244102678.1450977940" name="/" resourcePath=""> + <toolChain id="cdt.managedbuild.toolchain.gnu.base.1670099165" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base"> + <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF" id="cdt.managedbuild.target.gnu.platform.base.1425058182" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/> + <builder arguments=".." buildPath="${workspace_loc:/vision_utils/build}" command="cmake" id="cdt.managedbuild.target.gnu.builder.base.1397358642" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/> + <tool id="cdt.managedbuild.tool.gnu.archiver.base.599567389" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/> + <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1572359948" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base"> + <option id="gnu.cpp.compiler.option.include.paths.1770487778" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath"> + <listOptionValue builtIn="false" value=""${workspace_loc:/vision_utils/src}""/> <listOptionValue builtIn="false" value="/usr/local/include"/> - <listOptionValue builtIn="false" value="/usr/include"/> - <listOptionValue builtIn="false" value="/opt/ros/indigo/include/opencv-3.1.0-dev"/> </option> - <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.341288586" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> + <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.466329004" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> </tool> - <tool id="cdt.managedbuild.tool.gnu.c.compiler.base.61708613" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base"> - <option id="gnu.c.compiler.option.include.paths.829945653" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath"> + <tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1838202852" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base"> + <option id="gnu.c.compiler.option.include.paths.1944000269" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath"> + <listOptionValue builtIn="false" value=""${workspace_loc:/vision_utils/src}""/> <listOptionValue builtIn="false" value="/usr/local/include"/> - <listOptionValue builtIn="false" value="/usr/include"/> - <listOptionValue builtIn="false" value="/opt/ros/indigo/include/opencv-3.1.0-dev"/> </option> - <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.166078074" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> + <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.964584931" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> </tool> - <tool id="cdt.managedbuild.tool.gnu.c.linker.base.2056051326" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/> - <tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.1724439765" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base"> - <option id="gnu.cpp.link.option.paths.619011598" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths"> - <listOptionValue builtIn="false" value="/usr/lib"/> + <tool id="cdt.managedbuild.tool.gnu.c.linker.base.1546364764" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/> + <tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.674742229" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base"> + <option id="gnu.cpp.link.option.paths.1264112011" superClass="gnu.cpp.link.option.paths" valueType="libPaths"> <listOptionValue builtIn="false" value="/usr/local/lib"/> </option> - <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1477240259" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> + <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.224259993" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinput" paths="$(LIBS)"/> </inputType> </tool> - <tool id="cdt.managedbuild.tool.gnu.assembler.base.507993336" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base"> - <option id="gnu.both.asm.option.include.paths.408889783" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath"> + <tool id="cdt.managedbuild.tool.gnu.assembler.base.2121101980" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base"> + <option id="gnu.both.asm.option.include.paths.738910739" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath"> + <listOptionValue builtIn="false" value=""${workspace_loc:/vision_utils/src}""/> <listOptionValue builtIn="false" value="/usr/local/include"/> - <listOptionValue builtIn="false" value="/usr/include"/> - <listOptionValue builtIn="false" value="/opt/ros/indigo/include/opencv-3.1.0-dev"/> </option> - <inputType id="cdt.managedbuild.tool.gnu.assembler.input.794492820" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> + <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1979788870" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> </tool> </toolChain> </folderInfo> @@ -65,7 +59,7 @@ </cconfiguration> </storageModule> <storageModule moduleId="cdtBuildSystem" version="4.0.0"> - <project id="vision_utils.null.1102208136" name="vision_utils"/> + <project id="vision_utils.null.866851028" name="vision_utils"/> </storageModule> <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/> <storageModule moduleId="refreshScope" versionNumber="2"> @@ -73,6 +67,7 @@ <resource resourceType="PROJECT" workspacePath="/vision_utils"/> </configuration> </storageModule> + <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/> <storageModule moduleId="scannerConfiguration"> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.1736073220;cdt.managedbuild.toolchain.gnu.base.1736073220.1390770886;cdt.managedbuild.tool.gnu.c.compiler.base.1459107576;cdt.managedbuild.tool.gnu.c.compiler.input.1695301683"> @@ -87,12 +82,18 @@ <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.727026548;cdt.managedbuild.toolchain.gnu.base.727026548.1071101131;cdt.managedbuild.tool.gnu.c.compiler.base.61708613;cdt.managedbuild.tool.gnu.c.compiler.input.166078074"> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> </scannerConfigBuildInfo> + <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.1244102678;cdt.managedbuild.toolchain.gnu.base.1244102678.1450977940;cdt.managedbuild.tool.gnu.cpp.compiler.base.1572359948;cdt.managedbuild.tool.gnu.cpp.compiler.input.466329004"> + <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> + </scannerConfigBuildInfo> <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.207681558;cdt.managedbuild.toolchain.gnu.base.207681558.1208625085;cdt.managedbuild.tool.gnu.cpp.compiler.base.1755527935;cdt.managedbuild.tool.gnu.cpp.compiler.input.1794914341"> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> </scannerConfigBuildInfo> <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.727026548;cdt.managedbuild.toolchain.gnu.base.727026548.1071101131;cdt.managedbuild.tool.gnu.cpp.compiler.base.433122623;cdt.managedbuild.tool.gnu.cpp.compiler.input.341288586"> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> </scannerConfigBuildInfo> + <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.1244102678;cdt.managedbuild.toolchain.gnu.base.1244102678.1450977940;cdt.managedbuild.tool.gnu.c.compiler.base.1838202852;cdt.managedbuild.tool.gnu.c.compiler.input.964584931"> + <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> + </scannerConfigBuildInfo> <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.1819918851;cdt.managedbuild.toolchain.gnu.base.1819918851.1318867162;cdt.managedbuild.tool.gnu.c.compiler.base.593702953;cdt.managedbuild.tool.gnu.c.compiler.input.392834553"> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> </scannerConfigBuildInfo> @@ -100,6 +101,4 @@ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> </scannerConfigBuildInfo> </storageModule> - <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/> - <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/> </cproject> diff --git a/ReadMe.md b/ReadMe.md index fe741e80fe3e34bd8d12dfcb90263dc22f182f55..81110c0d194bcb690b2708cac2718046ccb26584 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -27,6 +27,19 @@ Under MacOS most of the packages are available via [fink](http://www.finkproject $ make -j4 $ sudo make install ``` + * [YAML cpp](https://github.com/jbeder/yaml-cpp): Used to load parameters from YAML files. To install it run the following commands: + + +``` + $ sudo apt-get update + $ sudo apt-get install libyaml-cpp-dev +``` + * [Boost](http://www.boost.org/). Free peer-reviewed portable C++ source libraries. To install it run the following commands: + +``` + $ sudo apt-get update + $ sudo apt-get install libboost-all-dev +``` ### Compilation @@ -60,12 +73,12 @@ After doing so you will need to call cmake manually again. ### Configuration -The default build mode is DEBUG. That is, objects and executables include debug information. +The default build mode is RELEASE. That is, optimizing for speed. -The RELEASE build mode optimizes for speed. To build in this mode execute +With the DEBUG build mode objects and executables include debug information. To build in this mode execute ``` - $ cmake .. -DCMAKE_BUILD_TYPE=RELEASE + $ cmake .. -DCMAKE_BUILD_TYPE=DEBUG ``` The release mode will be kept until next time cmake is executed. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3a68cd19a9be673118d2deaaad0005efea56b541..ceae6cc75cfcf9a2dedda8395159caef3510fb2b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -169,7 +169,7 @@ SET(headers_alg_activesearch # locate the necessary dependencies FIND_PACKAGE(Eigen3 REQUIRED) FIND_PACKAGE(OpenCV REQUIRED) -FIND_PACKAGE(Boost REQUIRED) +#FIND_PACKAGE(Boost REQUIRED) if (OpenCV_FOUND) if (${OpenCV_VERSION_MAJOR} GREATER 2) @@ -193,7 +193,8 @@ ELSEIF(YAMLCPP_FOUND) ENDIF(YAMLCPP_FOUND) # add the necessary include directories -INCLUDE_DIRECTORIES(. ${EIGEN3_INCLUDE_DIR} ${OpenCV_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) +#INCLUDE_DIRECTORIES(. ${EIGEN3_INCLUDE_DIR} ${OpenCV_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) +INCLUDE_DIRECTORIES(. ${EIGEN3_INCLUDE_DIR} ${OpenCV_INCLUDE_DIRS}) IF(YAMLCPP_FOUND) INCLUDE_DIRECTORIES(${YAMLCPP_INCLUDE_DIR}) @@ -222,7 +223,8 @@ include_directories("${PROJECT_BINARY_DIR}/conf") ADD_LIBRARY(${PROJECT_NAME} SHARED ${sources}) # link necessary libraries -TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${OpenCV_LIBS} ${Boost_LIBRARIES}) +#TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${OpenCV_LIBS} ${Boost_LIBRARIES}) +TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${OpenCV_LIBS}) IF (YAMLCPP_FOUND) TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${YAMLCPP_LIBRARY}) diff --git a/src/algorithms/algorithm_base.cpp b/src/algorithms/algorithm_base.cpp index df3a03f5354163bc3c68988d479f1d54d75b4283..4c23670e07d8c77a63345aa385d6b6d6e28efd7d 100644 --- a/src/algorithms/algorithm_base.cpp +++ b/src/algorithms/algorithm_base.cpp @@ -40,6 +40,7 @@ AlgorithmBasePtr setupAlgorithm(const std::string& _type, const std::string& _un std::cerr << "[Vision utils]: Current version of the library has no YAML support. " << "Try installing YAML-related libraries and recompile and reinstall the Vision Utils library." << std::endl; + return NULL; } #endif diff --git a/src/descriptors/descriptor_base.cpp b/src/descriptors/descriptor_base.cpp index 5764bd3fd88f934005a1ec3913d8f02f84f59a53..1f76d5a50f0787b8acb87fd83fa6c6c317bd6235 100644 --- a/src/descriptors/descriptor_base.cpp +++ b/src/descriptors/descriptor_base.cpp @@ -47,6 +47,7 @@ DescriptorBasePtr setupDescriptor(const std::string& _type, const std::string& _ std::cerr << "[Vision utils]: Current version of the library has no YAML support. " << "Try installing YAML-related libraries and recompile and reinstall the Vision Utils library." << std::endl; + return NULL; } #endif diff --git a/src/detectors/detector_base.cpp b/src/detectors/detector_base.cpp index 559612d760df7058d1d78475722df1e17ec682ce..a660fd79321e11666e44183cf063d7c38d50c57c 100644 --- a/src/detectors/detector_base.cpp +++ b/src/detectors/detector_base.cpp @@ -70,6 +70,7 @@ DetectorBasePtr setupDetector(const std::string& _type, const std::string& _uniq std::cerr << "[Vision utils]: Current version of the library has no YAML support. " << "Try installing YAML-related libraries and recompile and reinstall the Vision Utils library." << std::endl; + return NULL; } #endif diff --git a/src/matchers/matcher_base.cpp b/src/matchers/matcher_base.cpp index f2744b4a76c72aec5cf86df890e3182dc6545cff..fffbb956323d4f830890dc3d58a86d18387a0801 100644 --- a/src/matchers/matcher_base.cpp +++ b/src/matchers/matcher_base.cpp @@ -182,6 +182,7 @@ MatcherBasePtr setupMatcher(const std::string& _type, const std::string& _unique std::cerr << "[Vision utils]: Current version of the library has no YAML support. " << "Try installing YAML-related libraries and recompile and reinstall the Vision Utils library." << std::endl; + return NULL; } #endif diff --git a/src/sensors/sensor_base.cpp b/src/sensors/sensor_base.cpp index a36ef53afe6495d6ca1b9a941a7aab7fd8ba537e..357508cdbf2270ee50e349c5e013d610f9a113d4 100644 --- a/src/sensors/sensor_base.cpp +++ b/src/sensors/sensor_base.cpp @@ -35,6 +35,7 @@ SensorBasePtr setupSensor(const std::string& _type, const std::string& _unique_n std::cerr << "[Vision utils]: Current version of the library has no YAML support. " << "Try installing YAML-related libraries and recompile and reinstall the Vision Utils library." << std::endl; + return NULL; } #endif diff --git a/src/vision_utils.cpp b/src/vision_utils.cpp index 7ce4c3d3d873fa8337a9ae99b78e1ddaa66bc954..2b68a93e9c091f8aad16977dc94bf702e2522433 100644 --- a/src/vision_utils.cpp +++ b/src/vision_utils.cpp @@ -280,6 +280,7 @@ std::string readYamlType(const std::string& _filename_dot_yaml, const std::strin std::cerr << "[Vision utils]: Current version of the library has no YAML support. " << "Try installing YAML-related libraries and recompile and reinstall the Vision Utils library." << std::endl; + return std::string(); } #endif diff --git a/src/vision_utils.h b/src/vision_utils.h index c47aeb0f2f30a5e82f2de592bb1f67f8faae6bbf..9f10fc48c4a54a1326eb7a1da833d1a04af208d2 100644 --- a/src/vision_utils.h +++ b/src/vision_utils.h @@ -15,8 +15,8 @@ #include <memory> // shared_ptr and weak_ptr // Boost -#include <boost/assign/std/vector.hpp> // for 'operator+=()' -using namespace boost::assign; // bring 'operator+=()' into scope +//#include <boost/assign/std/vector.hpp> // for 'operator+=()' +//using namespace boost::assign; // bring 'operator+=()' into scope // Eigen #include <eigen3/Eigen/Dense>