Sorry if i assigned the issue to you but the author Alfonso (alfonsosanchezbeato ) does not appear in the assignies list.
this sample does not compile.
#include <opencv2/highgui/highgui.hpp>
by
#include <opencv2/highgui.hpp> // but note that teire are two similar lines including highgui
[ 75%] Built target opencv_reg
Scanning dependencies of target example_reg_map_test
[ 75%] Building CXX object modules/reg/CMakeFiles/example_reg_map_test.dir/samples/map_test.cpp.o
In file included from /home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:43:0:
/home/noob/install/OpenCV/github/opencv/modules/highgui/include/opencv2/highgui/highgui.hpp:45:2: error: #error this is a compatibility header which should not be used inside the OpenCV library
#error this is a compatibility header which should not be used inside the OpenCV library
^
In file included from /home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:44:0:
/home/noob/install/OpenCV/github/opencv/modules/imgproc/include/opencv2/imgproc/imgproc.hpp:45:2: error: #error this is a compatibility header which should not be used inside the OpenCV library
#error this is a compatibility header which should not be used inside the OpenCV library
^
In file included from /home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:45:0:
/usr/local/include/opencv2/features2d/features2d.hpp:45:2: error: #error this is a compatibility header which should not be used inside the OpenCV library
#error this is a compatibility header which should not be used inside the OpenCV library
^
In file included from /home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:46:0:
/usr/local/include/opencv2/nonfree/nonfree.hpp:45:2: error: #error this is a compatibility header which should not be used inside the OpenCV library
#error this is a compatibility header which should not be used inside the OpenCV library
^
In file included from /home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:47:0:
/usr/local/include/opencv2/calib3d/calib3d.hpp:45:2: error: #error this is a compatibility header which should not be used inside the OpenCV library
#error this is a compatibility header which should not be used inside the OpenCV library
^
In file included from /home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:48:0:
/home/noob/install/OpenCV/github/opencv/modules/imgproc/include/opencv2/imgproc/imgproc.hpp:45:2: error: #error this is a compatibility header which should not be used inside the OpenCV library
#error this is a compatibility header which should not be used inside the OpenCV library
^
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp: In function ‘void showDifference(const cv::Mat&, const cv::Mat&, const char*)’:
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:68:6: warning: no previous declaration for ‘void showDifference(const cv::Mat&, const cv::Mat&, const char*)’ [-Wmissing-declarations]
void showDifference(const Mat& image1, const Mat& image2, const char* title)
^
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp: In function ‘void testShift(const cv::Mat&)’:
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:89:6: warning: no previous declaration for ‘void testShift(const cv::Mat&)’ [-Wmissing-declarations]
void testShift(const Mat& img1)
^
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp: In function ‘void testEuclidean(const cv::Mat&)’:
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:121:6: warning: no previous declaration for ‘void testEuclidean(const cv::Mat&)’ [-Wmissing-declarations]
void testEuclidean(const Mat& img1)
^
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp: In function ‘void testSimilarity(const cv::Mat&)’:
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:159:6: warning: no previous declaration for ‘void testSimilarity(const cv::Mat&)’ [-Wmissing-declarations]
void testSimilarity(const Mat& img1)
^
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp: In function ‘void testAffine(const cv::Mat&)’:
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:198:6: warning: no previous declaration for ‘void testAffine(const cv::Mat&)’ [-Wmissing-declarations]
void testAffine(const Mat& img1)
^
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp: In function ‘void testProjective(const cv::Mat&)’:
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:233:6: warning: no previous declaration for ‘void testProjective(const cv::Mat&)’ [-Wmissing-declarations]
void testProjective(const Mat& img1)
^
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp: In function ‘void calcHomographyFeature(const cv::Mat&, const cv::Mat&)’:
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:270:6: warning: no previous declaration for ‘void calcHomographyFeature(const cv::Mat&, const cv::Mat&)’ [-Wmissing-declarations]
void calcHomographyFeature(const Mat& image1, const Mat& image2)
^
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp: In function ‘void calcHomographyPixel(const cv::Mat&, const cv::Mat&)’:
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:352:6: warning: no previous declaration for ‘void calcHomographyPixel(const cv::Mat&, const cv::Mat&)’ [-Wmissing-declarations]
void calcHomographyPixel(const Mat& img1, const Mat& img2)
^
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp: In function ‘void comparePixelVsFeature(const cv::Mat&, const cv::Mat&)’:
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:373:6: warning: no previous declaration for ‘void comparePixelVsFeature(const cv::Mat&, const cv::Mat&)’ [-Wmissing-declarations]
void comparePixelVsFeature(const Mat& img1_8b, const Mat& img2_8b)
^
make[2]: *** [modules/reg/CMakeFiles/example_reg_map_test.dir/samples/map_test.cpp.o] Erreur 1
make[1]: *** [modules/reg/CMakeFiles/example_reg_map_test.dir/all] Erreur 2
make: *** [all] Erreur 2
I got these problems : code warnings and liker error (you should specifiy which module to link to in the config files)
Scanning dependencies of target example_reg_map_test
[ 75%] Building CXX object modules/reg/CMakeFiles/example_reg_map_test.dir/samples/map_test.cpp.o
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp: In function ‘void showDifference(const cv::Mat&, const cv::Mat&, const char*)’:
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:68:6: warning: no previous declaration for ‘void showDifference(const cv::Mat&, const cv::Mat&, const char*)’ [-Wmissing-declarations]
void showDifference(const Mat& image1, const Mat& image2, const char* title)
^
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp: In function ‘void testShift(const cv::Mat&)’:
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:89:6: warning: no previous declaration for ‘void testShift(const cv::Mat&)’ [-Wmissing-declarations]
void testShift(const Mat& img1)
^
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp: In function ‘void testEuclidean(const cv::Mat&)’:
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:121:6: warning: no previous declaration for ‘void testEuclidean(const cv::Mat&)’ [-Wmissing-declarations]
void testEuclidean(const Mat& img1)
^
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp: In function ‘void testSimilarity(const cv::Mat&)’:
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:159:6: warning: no previous declaration for ‘void testSimilarity(const cv::Mat&)’ [-Wmissing-declarations]
void testSimilarity(const Mat& img1)
^
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp: In function ‘void testAffine(const cv::Mat&)’:
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:198:6: warning: no previous declaration for ‘void testAffine(const cv::Mat&)’ [-Wmissing-declarations]
void testAffine(const Mat& img1)
^
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp: In function ‘void testProjective(const cv::Mat&)’:
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:233:6: warning: no previous declaration for ‘void testProjective(const cv::Mat&)’ [-Wmissing-declarations]
void testProjective(const Mat& img1)
^
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp: In function ‘void calcHomographyFeature(const cv::Mat&, const cv::Mat&)’:
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:270:6: warning: no previous declaration for ‘void calcHomographyFeature(const cv::Mat&, const cv::Mat&)’ [-Wmissing-declarations]
void calcHomographyFeature(const Mat& image1, const Mat& image2)
^
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp: In function ‘void calcHomographyPixel(const cv::Mat&, const cv::Mat&)’:
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:352:6: warning: no previous declaration for ‘void calcHomographyPixel(const cv::Mat&, const cv::Mat&)’ [-Wmissing-declarations]
void calcHomographyPixel(const Mat& img1, const Mat& img2)
^
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp: In function ‘void comparePixelVsFeature(const cv::Mat&, const cv::Mat&)’:
/home/noob/install/OpenCV/github/opencv_contrib/modules/reg/samples/map_test.cpp:373:6: warning: no previous declaration for ‘void comparePixelVsFeature(const cv::Mat&, const cv::Mat&)’ [-Wmissing-declarations]
void comparePixelVsFeature(const Mat& img1_8b, const Mat& img2_8b)
^
Linking CXX executable ../../bin/example_reg_map_test
CMakeFiles/example_reg_map_test.dir/samples/map_test.cpp.o: dans la fonction « calcHomographyFeature(cv::Mat const&, cv::Mat const&) »:
map_test.cpp:(.text+0x72f9): référence indéfinie vers « cv::SURF::SURF(double, int, int, bool, bool) »
map_test.cpp:(.text+0x7396): référence indéfinie vers « cv::FeatureDetector::detect(cv::_InputArray const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::_InputArray const&) const »
map_test.cpp:(.text+0x73f3): référence indéfinie vers « cv::FeatureDetector::detect(cv::_InputArray const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::_InputArray const&) const »
map_test.cpp:(.text+0x7400): référence indéfinie vers « cv::SURF::SURF() »
map_test.cpp:(.text+0x7592): référence indéfinie vers « cv::Feature2D::compute(cv::_InputArray const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::_OutputArray const&) const »
map_test.cpp:(.text+0x762c): référence indéfinie vers « cv::Feature2D::compute(cv::_InputArray const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::_OutputArray const&) const »
map_test.cpp:(.text+0x764f): référence indéfinie vers « cv::flann::SearchParams::SearchParams(int, float, bool) »
map_test.cpp:(.text+0x7698): référence indéfinie vers « cv::flann::KDTreeIndexParams::KDTreeIndexParams(int) »
map_test.cpp:(.text+0x76e6): référence indéfinie vers « cv::FlannBasedMatcher::FlannBasedMatcher(cv::Ptr<cv::flann::IndexParams> const&, cv::Ptr<cv::flann::SearchParams> const&) »
map_test.cpp:(.text+0x77e9): référence indéfinie vers « cv::DescriptorMatcher::match(cv::_InputArray const&, cv::_InputArray const&, std::vector<cv::DMatch, std::allocator<cv::DMatch> >&, cv::_InputArray const&) const »
map_test.cpp:(.text+0x7e6e): référence indéfinie vers « cv::findHomography(cv::_InputArray const&, cv::_InputArray const&, int, double, cv::_OutputArray const&) »
map_test.cpp:(.text+0x87df): référence indéfinie vers « vtable for cv::FlannBasedMatcher »
map_test.cpp:(.text+0x87e8): référence indéfinie vers « cv::DescriptorMatcher::DescriptorCollection::~DescriptorCollection() »
map_test.cpp:(.text+0x8885): référence indéfinie vers « cv::DescriptorMatcher::~DescriptorMatcher() »
map_test.cpp:(.text+0x8984): référence indéfinie vers « VTT for cv::SURF »
map_test.cpp:(.text+0x898b): référence indéfinie vers « VTT for cv::SURF »
map_test.cpp:(.text+0x8990): référence indéfinie vers « VTT for cv::SURF »
map_test.cpp:(.text+0x8997): référence indéfinie vers « VTT for cv::SURF »
map_test.cpp:(.text+0x89c4): référence indéfinie vers « cv::DescriptorExtractor::~DescriptorExtractor() »
map_test.cpp:(.text+0x89d1): référence indéfinie vers « VTT for cv::SURF »
map_test.cpp:(.text+0x89d6): référence indéfinie vers « cv::FeatureDetector::~FeatureDetector() »
map_test.cpp:(.text+0x8a18): référence indéfinie vers « VTT for cv::SURF »
map_test.cpp:(.text+0x8a39): référence indéfinie vers « cv::DescriptorExtractor::~DescriptorExtractor() »
map_test.cpp:(.text+0x8a46): référence indéfinie vers « VTT for cv::SURF »
map_test.cpp:(.text+0x8a4b): référence indéfinie vers « cv::FeatureDetector::~FeatureDetector() »
map_test.cpp:(.text+0x8d24): référence indéfinie vers « cv::DescriptorMatcher::~DescriptorMatcher() »
map_test.cpp:(.text+0x8ec4): référence indéfinie vers « VTT for cv::SURF »
map_test.cpp:(.text+0x8ecc): référence indéfinie vers « cv::FeatureDetector::~FeatureDetector() »
map_test.cpp:(.text+0x8fe2): référence indéfinie vers « VTT for cv::SURF »
map_test.cpp:(.text+0x8fea): référence indéfinie vers « cv::FeatureDetector::~FeatureDetector() »
CMakeFiles/example_reg_map_test.dir/samples/map_test.cpp.o: dans la fonction « cv::SURF::~SURF() »:
map_test.cpp:(.text._ZN2cv4SURFD1Ev[_ZN2cv4SURFD1Ev]+0x2): référence indéfinie vers « VTT for cv::SURF »
map_test.cpp:(.text._ZN2cv4SURFD1Ev[_ZN2cv4SURFD1Ev]+0x15): référence indéfinie vers « VTT for cv::SURF »
map_test.cpp:(.text._ZN2cv4SURFD1Ev[_ZN2cv4SURFD1Ev]+0x1c): référence indéfinie vers « VTT for cv::SURF »
map_test.cpp:(.text._ZN2cv4SURFD1Ev[_ZN2cv4SURFD1Ev]+0x30): référence indéfinie vers « VTT for cv::SURF »
map_test.cpp:(.text._ZN2cv4SURFD1Ev[_ZN2cv4SURFD1Ev]+0x38): référence indéfinie vers « cv::DescriptorExtractor::~DescriptorExtractor() »
map_test.cpp:(.text._ZN2cv4SURFD1Ev[_ZN2cv4SURFD1Ev]+0x3d): référence indéfinie vers « VTT for cv::SURF »
map_test.cpp:(.text._ZN2cv4SURFD1Ev[_ZN2cv4SURFD1Ev]+0x45): référence indéfinie vers « cv::FeatureDetector::~FeatureDetector() »
map_test.cpp:(.text._ZN2cv4SURFD1Ev[_ZN2cv4SURFD1Ev]+0x5b): référence indéfinie vers « VTT for cv::SURF »
map_test.cpp:(.text._ZN2cv4SURFD1Ev[_ZN2cv4SURFD1Ev]+0x66): référence indéfinie vers « cv::FeatureDetector::~FeatureDetector() »
CMakeFiles/example_reg_map_test.dir/samples/map_test.cpp.o: dans la fonction « cv::detail::PtrOwnerImpl<cv::flann::SearchParams, cv::DefaultDeleter<cv::flann::SearchParams> >::deleteSelf() »:
map_test.cpp:(.text._ZN2cv6detail12PtrOwnerImplINS_5flann12SearchParamsENS_14DefaultDeleterIS3_EEE10deleteSelfEv[_ZN2cv6detail12PtrOwnerImplINS_5flann12SearchParamsENS_14DefaultDeleterIS3_EEE10deleteSelfEv]+0x16): référence indéfinie vers « cv::flann::IndexParams::~IndexParams() »
CMakeFiles/example_reg_map_test.dir/samples/map_test.cpp.o: dans la fonction « cv::detail::PtrOwnerImpl<cv::flann::KDTreeIndexParams, cv::DefaultDeleter<cv::flann::KDTreeIndexParams> >::deleteSelf() »:
map_test.cpp:(.text._ZN2cv6detail12PtrOwnerImplINS_5flann17KDTreeIndexParamsENS_14DefaultDeleterIS3_EEE10deleteSelfEv[_ZN2cv6detail12PtrOwnerImplINS_5flann17KDTreeIndexParamsENS_14DefaultDeleterIS3_EEE10deleteSelfEv]+0x16): référence indéfinie vers « cv::flann::IndexParams::~IndexParams() »
CMakeFiles/example_reg_map_test.dir/samples/map_test.cpp.o: dans la fonction « cv::FlannBasedMatcher::~FlannBasedMatcher() »:
map_test.cpp:(.text._ZN2cv17FlannBasedMatcherD2Ev[_ZN2cv17FlannBasedMatcherD5Ev]+0x11): référence indéfinie vers « vtable for cv::FlannBasedMatcher »
map_test.cpp:(.text._ZN2cv17FlannBasedMatcherD2Ev[_ZN2cv17FlannBasedMatcherD5Ev]+0x16): référence indéfinie vers « cv::DescriptorMatcher::DescriptorCollection::~DescriptorCollection() »
map_test.cpp:(.text._ZN2cv17FlannBasedMatcherD2Ev[_ZN2cv17FlannBasedMatcherD5Ev]+0xc2): référence indéfinie vers « cv::DescriptorMatcher::~DescriptorMatcher() »
map_test.cpp:(.text._ZN2cv17FlannBasedMatcherD2Ev[_ZN2cv17FlannBasedMatcherD5Ev]+0x84): référence indéfinie vers « cv::DescriptorMatcher::~DescriptorMatcher() »
CMakeFiles/example_reg_map_test.dir/samples/map_test.cpp.o: dans la fonction « cv::FlannBasedMatcher::~FlannBasedMatcher() »:
map_test.cpp:(.text._ZN2cv17FlannBasedMatcherD0Ev[_ZN2cv17FlannBasedMatcherD0Ev]+0x11): référence indéfinie vers « vtable for cv::FlannBasedMatcher »
map_test.cpp:(.text._ZN2cv17FlannBasedMatcherD0Ev[_ZN2cv17FlannBasedMatcherD0Ev]+0x16): référence indéfinie vers « cv::DescriptorMatcher::DescriptorCollection::~DescriptorCollection() »
map_test.cpp:(.text._ZN2cv17FlannBasedMatcherD0Ev[_ZN2cv17FlannBasedMatcherD0Ev]+0x7e): référence indéfinie vers « cv::DescriptorMatcher::~DescriptorMatcher() »
map_test.cpp:(.text._ZN2cv17FlannBasedMatcherD0Ev[_ZN2cv17FlannBasedMatcherD0Ev]+0xc2): référence indéfinie vers « cv::DescriptorMatcher::~DescriptorMatcher() »
collect2: error: ld returned 1 exit status
make[2]: *** [bin/example_reg_map_test] Erreur 1
make[1]: *** [modules/reg/CMakeFiles/example_reg_map_test.dir/all] Erreur 2
make: *** [all] Erreur 2