diff --git a/src/nonFree/sift/SIFT_describer.hpp b/src/nonFree/sift/SIFT_describer.hpp index 28130dc5c8..5aad4745d8 100644 --- a/src/nonFree/sift/SIFT_describer.hpp +++ b/src/nonFree/sift/SIFT_describer.hpp @@ -84,6 +84,26 @@ class SIFT_Image_describer : public Image_describer ~SIFT_Image_describer() {} + bool Set_configuration_preset(EDESCRIBER_PRESET preset) + { + switch(preset) + { + case NORMAL_PRESET: + _params._peak_threshold = 0.04f; + break; + case HIGH_PRESET: + _params._peak_threshold = 0.01f; + break; + case ULTRA_PRESET: + _params._peak_threshold = 0.01f; + _params._first_octave = -1; + break; + default: + return false; + } + return true; + } + /** @brief Detect regions on the image and compute their attributes (description) @param image Image. diff --git a/src/openMVG/features/image_describer.hpp b/src/openMVG/features/image_describer.hpp index fd33786103..e17674b386 100644 --- a/src/openMVG/features/image_describer.hpp +++ b/src/openMVG/features/image_describer.hpp @@ -17,6 +17,12 @@ namespace openMVG { namespace features { +enum EDESCRIBER_PRESET +{ + NORMAL_PRESET, + HIGH_PRESET, + ULTRA_PRESET +}; /// A pure virtual class for image description computation class Image_describer { @@ -24,6 +30,13 @@ class Image_describer Image_describer() {} virtual ~Image_describer() {} + /** + @brief Use a preset to control the number of detected regions + @param preset The preset configuration + @return True if configuration succeed. + */ + virtual bool Set_configuration_preset(EDESCRIBER_PRESET preset) = 0; + /** @brief Detect regions on the image and compute their attributes (description) @param image Image. diff --git a/src/openMVG/features/image_describer_akaze.hpp b/src/openMVG/features/image_describer_akaze.hpp index eed496a6db..b8d33edaed 100644 --- a/src/openMVG/features/image_describer_akaze.hpp +++ b/src/openMVG/features/image_describer_akaze.hpp @@ -56,6 +56,26 @@ class AKAZE_Image_describer : public Image_describer bool bOrientation = true ):Image_describer(), _params(params), _bOrientation(bOrientation) {} + + bool Set_configuration_preset(EDESCRIBER_PRESET preset) + { + switch(preset) + { + case NORMAL_PRESET: + _params._options.fThreshold = AKAZEConfig().fThreshold; + break; + case HIGH_PRESET: + _params._options.fThreshold = AKAZEConfig().fThreshold/10.; + break; + case ULTRA_PRESET: + _params._options.fThreshold = AKAZEConfig().fThreshold/100.; + break; + default: + return false; + } + return true; + } + /** @brief Detect regions on the image and compute their attributes (description) @param image Image. diff --git a/src/software/SfM/main_computeMatches_OpenCV.cpp b/src/software/SfM/main_ComputeFeaturesAndMatches_OpenCV.cpp similarity index 100% rename from src/software/SfM/main_computeMatches_OpenCV.cpp rename to src/software/SfM/main_ComputeFeaturesAndMatches_OpenCV.cpp diff --git a/src/software/SfM/main_computeMatches.cpp b/src/software/SfM/main_ComputeMatches.cpp similarity index 100% rename from src/software/SfM/main_computeMatches.cpp rename to src/software/SfM/main_ComputeMatches.cpp diff --git a/src/software/SfM/main_computeStructureFromKnownPoses.cpp b/src/software/SfM/main_ComputeStructureFromKnownPoses.cpp similarity index 100% rename from src/software/SfM/main_computeStructureFromKnownPoses.cpp rename to src/software/SfM/main_ComputeStructureFromKnownPoses.cpp