Skip to content

Commit

Permalink
[samples] Prefer to use internal SIFT rather than vlfeat sift openMVG…
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoulon committed Jul 7, 2017
1 parent 694f715 commit c4e5a29
Show file tree
Hide file tree
Showing 22 changed files with 29 additions and 51 deletions.
2 changes: 1 addition & 1 deletion src/openMVG/features/feature.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static bool saveFeatsToFile(
template< typename FeaturesT>
void PointsToMat(
const FeaturesT & vec_feats,
Eigen::Ref<Mat> m)
Mat& m)
{
m.resize(2, vec_feats.size());
using ValueT = typename FeaturesT::value_type; // Container type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
#include "openMVG/image/image_io.hpp"
#include "openMVG/image/image_concat.hpp"
#include "openMVG/features/akaze/image_describer_akaze.hpp"
#include "openMVG/features/sift/SIFT_Anatomy_Image_Describer.hpp"
#include "openMVG/features/svg_features.hpp"
#include "openMVG/matching/regions_matcher.hpp"
#include "openMVG/matching/svg_matches.hpp"

#include "nonFree/sift/SIFT_describer.hpp"

#include "third_party/stlplus3/filesystemSimplified/file_system.hpp"
#include "third_party/cmdLine/cmdLine.h"
#include <memory>
Expand Down Expand Up @@ -62,7 +61,7 @@ int main(int argc, char **argv) {
using namespace openMVG::features;
std::unique_ptr<Image_describer> image_describer;
if (sImage_describer_type == "SIFT")
image_describer.reset(new SIFT_Image_describer(SIFT_Image_describer::Params()));
image_describer.reset(new SIFT_Anatomy_Image_describer(SIFT_Anatomy_Image_describer::Params()));
else if (sImage_describer_type == "AKAZE")
image_describer = AKAZE_Image_describer::create
(AKAZE_Image_describer::Params(AKAZE::Params(), AKAZE_MSURF));
Expand Down
3 changes: 1 addition & 2 deletions src/openMVG_Samples/features_kvld_filter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ target_link_libraries(openMVG_sample_features_kvld
openMVG_kvld
openMVG_features
openMVG_matching
stlplus
vlsift)
stlplus)
target_compile_definitions(openMVG_sample_features_kvld
PRIVATE -DTHIS_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
set_property(TARGET openMVG_sample_features_kvld PROPERTY FOLDER OpenMVG/Samples)
5 changes: 2 additions & 3 deletions src/openMVG_Samples/features_kvld_filter/kvld_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#include "openMVG/features/sift/SIFT_Anatomy_Image_Describer.hpp"
#include "openMVG/features/svg_features.hpp"
#include "openMVG/image/image_io.hpp"
#include "openMVG/image/image_concat.hpp"
Expand All @@ -14,8 +15,6 @@
#include "openMVG/matching/regions_matcher.hpp"
#include "openMVG/matching/svg_matches.hpp"

#include "nonFree/sift/SIFT_describer.hpp"

#include "third_party/cmdLine/cmdLine.h"
#include "third_party/stlplus3/filesystemSimplified/file_system.hpp"
#include "third_party/vectorGraphics/svgDrawer.hpp"
Expand Down Expand Up @@ -96,7 +95,7 @@ int main(int argc, char **argv) {
//--
using namespace openMVG::features;
std::unique_ptr<Image_describer> image_describer
(new SIFT_Image_describer(SIFT_Image_describer::Params(-1)));
(new SIFT_Anatomy_Image_describer(SIFT_Anatomy_Image_describer::Params(-1)));
std::map<IndexT, std::unique_ptr<features::Regions> > regions_perImage;
image_describer->Describe(imageL, regions_perImage[0]);
image_describer->Describe(imageR, regions_perImage[1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ target_link_libraries(openMVG_sample_features_siftPutative
openMVG_image
openMVG_features
openMVG_matching
vlsift
stlplus)
target_compile_definitions(openMVG_sample_features_siftPutative
PRIVATE -DTHIS_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#include "openMVG/features/feature.hpp"
#include "openMVG/features/sift/SIFT_Anatomy_Image_Describer.hpp"
#include "openMVG/features/svg_features.hpp"
#include "openMVG/image/image_io.hpp"
#include "openMVG/image/image_concat.hpp"
#include "openMVG/matching/regions_matcher.hpp"
#include "openMVG/matching/svg_matches.hpp"
//
#include "nonFree/sift/SIFT_describer.hpp"
#include "third_party/stlplus3/filesystemSimplified/file_system.hpp"

#include <cstdlib>
Expand Down Expand Up @@ -41,7 +41,7 @@ int main() {
// Detect regions thanks to an image_describer
//--
using namespace openMVG::features;
std::unique_ptr<Image_describer> image_describer(new SIFT_Image_describer);
std::unique_ptr<Image_describer> image_describer(new SIFT_Anatomy_Image_describer);
std::map<IndexT, std::unique_ptr<features::Regions> > regions_perImage;
image_describer->Describe(imageL, regions_perImage[0]);
image_describer->Describe(imageR, regions_perImage[1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ target_link_libraries(openMVG_sample_multiview_robustEssential
openMVG_features
openMVG_geometry
openMVG_matching
openMVG_sfm
vlsift)
openMVG_sfm)
target_compile_definitions(openMVG_sample_multiview_robustEssential
PRIVATE -DTHIS_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
set_property(TARGET openMVG_sample_multiview_robustEssential PROPERTY FOLDER OpenMVG/Samples)
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "openMVG/cameras/Camera_Pinhole.hpp"
#include "openMVG/features/feature.hpp"
#include "openMVG/features/sift/SIFT_Anatomy_Image_Describer.hpp"
#include "openMVG/features/svg_features.hpp"
#include "openMVG/geometry/pose3.hpp"
#include "openMVG/image/image_io.hpp"
Expand All @@ -19,8 +20,6 @@
#include "openMVG/numeric/eigen_alias_definition.hpp"
#include "openMVG/sfm/pipelines/sfm_robust_model_estimation.hpp"

#include "nonFree/sift/SIFT_describer.hpp"

#include "third_party/stlplus3/filesystemSimplified/file_system.hpp"

#include <iostream>
Expand Down Expand Up @@ -60,7 +59,7 @@ int main() {
// Detect regions thanks to an image_describer
//--
using namespace openMVG::features;
std::unique_ptr<Image_describer> image_describer(new SIFT_Image_describer);
std::unique_ptr<Image_describer> image_describer(new SIFT_Anatomy_Image_describer);
std::map<IndexT, std::unique_ptr<features::Regions> > regions_perImage;
image_describer->Describe(imageL, regions_perImage[0]);
image_describer->Describe(imageR, regions_perImage[1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ target_link_libraries(openMVG_sample_multiview_robustEssential_ba
openMVG_matching
openMVG_system
openMVG_sfm
stlplus
vlsift)
stlplus)
target_compile_definitions(openMVG_sample_multiview_robustEssential_ba
PRIVATE -DTHIS_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
set_property(TARGET openMVG_sample_multiview_robustEssential_ba PROPERTY FOLDER OpenMVG/Samples)
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "openMVG/cameras/Camera_Pinhole.hpp"
#include "openMVG/cameras/Camera_Pinhole_Radial.hpp"
#include "openMVG/features/feature.hpp"
#include "openMVG/features/sift/SIFT_Anatomy_Image_Describer.hpp"
#include "openMVG/features/svg_features.hpp"
#include "openMVG/geometry/pose3.hpp"
#include "openMVG/image/image_io.hpp"
Expand All @@ -24,8 +25,6 @@
#include "openMVG/sfm/sfm_data_BA_ceres.hpp"
#include "openMVG/sfm/sfm_data_io.hpp"

#include "nonFree/sift/SIFT_describer.hpp"

#include "third_party/stlplus3/filesystemSimplified/file_system.hpp"

#include <iostream>
Expand Down Expand Up @@ -67,7 +66,7 @@ int main() {
// Detect regions thanks to an image_describer
//--
using namespace openMVG::features;
std::unique_ptr<Image_describer> image_describer(new SIFT_Image_describer);
std::unique_ptr<Image_describer> image_describer(new SIFT_Anatomy_Image_describer);
std::map<IndexT, std::unique_ptr<features::Regions> > regions_perImage;
image_describer->Describe(imageL, regions_perImage[0]);
image_describer->Describe(imageR, regions_perImage[1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ target_link_libraries(openMVG_sample_multiview_robustEssential_spherical
openMVG_matching
openMVG_system
openMVG_sfm
stlplus
vlsift
)
stlplus)
target_compile_definitions(openMVG_sample_multiview_robustEssential_spherical
PRIVATE -DTHIS_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
set_property(TARGET openMVG_sample_multiview_robustEssential_spherical PROPERTY FOLDER OpenMVG/Samples)
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "openMVG/cameras/Camera_Spherical.hpp"
#include "openMVG/features/feature.hpp"
#include "openMVG/features/sift/SIFT_Anatomy_Image_Describer.hpp"
#include "openMVG/features/svg_features.hpp"
#include "openMVG/image/image_io.hpp"
#include "openMVG/image/image_concat.hpp"
Expand All @@ -25,8 +26,6 @@
#include "openMVG/sfm/sfm_data_BA_ceres.hpp"
#include "openMVG/sfm/sfm_data_io.hpp"

#include "nonFree/sift/SIFT_describer.hpp"

#include "third_party/cmdLine/cmdLine.h"
#include "third_party/stlplus3/filesystemSimplified/file_system.hpp"

Expand Down Expand Up @@ -86,7 +85,7 @@ int main(int argc, char **argv) {
//--
using namespace openMVG::features;
std::unique_ptr<Image_describer> image_describer
(new SIFT_Image_describer(SIFT_Image_describer::Params(-1)));
(new SIFT_Anatomy_Image_describer(SIFT_Anatomy_Image_describer::Params(-1)));
std::map<IndexT, std::unique_ptr<features::Regions> > regions_perImage;
image_describer->Describe(imageL, regions_perImage[0]);
image_describer->Describe(imageR, regions_perImage[1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ target_link_libraries(openMVG_sample_robust_estimation_Homography
openMVG_multiview
openMVG_features
openMVG_matching
vlsift
stlplus)
target_compile_definitions(openMVG_sample_robust_estimation_Homography
PRIVATE -DTHIS_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "openMVG/image/image_io.hpp"
#include "openMVG/image/image_concat.hpp"
#include "openMVG/features/feature.hpp"
#include "openMVG/features/sift/SIFT_Anatomy_Image_Describer.hpp"
#include "openMVG/features/svg_features.hpp"
#include "openMVG/matching/regions_matcher.hpp"
#include "openMVG/matching/svg_matches.hpp"
Expand All @@ -31,9 +32,6 @@
#include "openMVG/robust_estimation/robust_estimator_ACRansac.hpp"
#include "openMVG/robust_estimation/robust_estimator_ACRansacKernelAdaptator.hpp"

// Include to an Image Describer (SIFT)
#include "nonFree/sift/SIFT_describer.hpp"

#include "third_party/stlplus3/filesystemSimplified/file_system.hpp"
#include "third_party/vectorGraphics/svgDrawer.hpp"

Expand Down Expand Up @@ -80,7 +78,7 @@ int main() {
// Detect regions thanks to an image_describer
//--
std::unique_ptr<Image_describer> image_describer
(new SIFT_Image_describer(SIFT_Image_describer::Params(-1)));
(new SIFT_Anatomy_Image_describer(SIFT_Anatomy_Image_describer::Params(-1)));
std::map<IndexT, std::unique_ptr<features::Regions> > regions_perImage;
image_describer->Describe(imageL, regions_perImage[0]);
image_describer->Describe(imageR, regions_perImage[1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ target_link_libraries(openMVG_sample_multiview_robustFundamental
openMVG_multiview
openMVG_features
openMVG_matching
stlplus
vlsift)
stlplus)
target_compile_definitions(openMVG_sample_multiview_robustFundamental
PRIVATE -DTHIS_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
set_property(TARGET openMVG_sample_multiview_robustFundamental PROPERTY FOLDER OpenMVG/Samples)
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#include "openMVG/features/svg_features.hpp"
#include "openMVG/features/sift/SIFT_Anatomy_Image_Describer.hpp"
#include "openMVG/image/image_io.hpp"
#include "openMVG/image/image_concat.hpp"
#include "openMVG/matching/regions_matcher.hpp"
Expand All @@ -18,8 +19,6 @@

#include "third_party/stlplus3/filesystemSimplified/file_system.hpp"

#include "nonFree/sift/SIFT_describer.hpp"

#include <iostream>
#include <string>
#include <utility>
Expand All @@ -46,7 +45,7 @@ int main() {
// Detect regions thanks to an image_describer
//--
using namespace openMVG::features;
std::unique_ptr<Image_describer> image_describer(new SIFT_Image_describer);
std::unique_ptr<Image_describer> image_describer(new SIFT_Anatomy_Image_describer);
std::map<IndexT, std::unique_ptr<features::Regions> > regions_perImage;
image_describer->Describe(imageL, regions_perImage[0]);
image_describer->Describe(imageR, regions_perImage[1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ target_link_libraries(openMVG_sample_multiview_robustFundamental_guided
openMVG_multiview
openMVG_features
openMVG_matching
stlplus
vlsift)
stlplus)
target_compile_definitions(openMVG_sample_multiview_robustFundamental_guided
PRIVATE -DTHIS_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
set_property(TARGET openMVG_sample_multiview_robustFundamental_guided PROPERTY FOLDER OpenMVG/Samples)
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#include "openMVG/features/feature.hpp"
#include "openMVG/features/sift/SIFT_Anatomy_Image_Describer.hpp"
#include "openMVG/features/svg_features.hpp"
#include "openMVG/image/image_io.hpp"
#include "openMVG/image/image_concat.hpp"
Expand All @@ -18,8 +19,6 @@
#include "openMVG/robust_estimation/robust_estimator_ACRansac.hpp"
#include "openMVG/robust_estimation/robust_estimator_ACRansacKernelAdaptator.hpp"

#include "nonFree/sift/SIFT_describer.hpp"

#include "third_party/vectorGraphics/svgDrawer.hpp"
#include "third_party/stlplus3/filesystemSimplified/file_system.hpp"

Expand Down Expand Up @@ -50,7 +49,7 @@ int main() {
// Detect regions thanks to an image_describer
//--
using namespace openMVG::features;
std::unique_ptr<Image_describer> image_describer(new SIFT_Image_describer);
std::unique_ptr<Image_describer> image_describer(new SIFT_Anatomy_Image_describer);
std::map<IndexT, std::unique_ptr<features::Regions> > regions_perImage;
image_describer->Describe(imageL, regions_perImage[0]);
image_describer->Describe(imageR, regions_perImage[1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ target_link_libraries(openMVG_sample_multiview_robustHomography
openMVG_multiview
openMVG_features
openMVG_matching
vlsift
stlplus)
target_compile_definitions(openMVG_sample_multiview_robustHomography
PRIVATE -DTHIS_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#include "openMVG/features/feature.hpp"
#include "openMVG/features/sift/SIFT_Anatomy_Image_Describer.hpp"
#include "openMVG/features/svg_features.hpp"
#include "openMVG/image/image_io.hpp"
#include "openMVG/image/image_concat.hpp"
Expand All @@ -19,8 +20,6 @@
#include "openMVG/robust_estimation/robust_estimator_ACRansacKernelAdaptator.hpp"
#include "openMVG/types.hpp"

#include "nonFree/sift/SIFT_describer.hpp"

#include "third_party/cmdLine/cmdLine.h"
#include "third_party/stlplus3/filesystemSimplified/file_system.hpp"

Expand Down Expand Up @@ -52,7 +51,7 @@ int main() {
//--
using namespace openMVG::features;
std::unique_ptr<Image_describer> image_describer
(new SIFT_Image_describer(SIFT_Image_describer::Params(-1)));
(new SIFT_Anatomy_Image_describer(SIFT_Anatomy_Image_describer::Params(-1)));
std::map<IndexT, std::unique_ptr<features::Regions> > regions_perImage;
image_describer->Describe(imageL, regions_perImage[0]);
image_describer->Describe(imageR, regions_perImage[1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ target_link_libraries(openMVG_sample_multiview_robustHomography_guided
openMVG_multiview
openMVG_features
openMVG_matching
vlsift
stlplus)
target_compile_definitions(openMVG_sample_multiview_robustHomography_guided
PRIVATE -DTHIS_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#include "openMVG/features/feature.hpp"
#include "openMVG/features/sift/SIFT_Anatomy_Image_Describer.hpp"
#include "openMVG/features/svg_features.hpp"
#include "openMVG/image/image_io.hpp"
#include "openMVG/image/image_concat.hpp"
Expand All @@ -19,8 +20,6 @@
#include "openMVG/robust_estimation/robust_estimator_ACRansacKernelAdaptator.hpp"
#include "openMVG/types.hpp"

#include "nonFree/sift/SIFT_describer.hpp"

#include "third_party/cmdLine/cmdLine.h"
#include "third_party/stlplus3/filesystemSimplified/file_system.hpp"
#include "third_party/vectorGraphics/svgDrawer.hpp"
Expand Down Expand Up @@ -54,7 +53,7 @@ int main() {
//--
using namespace openMVG::features;
std::unique_ptr<Image_describer> image_describer
(new SIFT_Image_describer(SIFT_Image_describer::Params(-1)));
(new SIFT_Anatomy_Image_describer(SIFT_Anatomy_Image_describer::Params(-1)));
std::map<IndexT, std::unique_ptr<features::Regions> > regions_perImage;
image_describer->Describe(imageL, regions_perImage[0]);
image_describer->Describe(imageR, regions_perImage[1]);
Expand Down

0 comments on commit c4e5a29

Please sign in to comment.