diff --git a/modules/features2d/include/opencv2/features2d/features2d.hpp b/modules/features2d/include/opencv2/features2d/features2d.hpp index eda0f14a35bcef4c21077fd2a3da0602fe47fe81..6835335400b462bbecca039f67dc1229a11929b8 100644 --- a/modules/features2d/include/opencv2/features2d/features2d.hpp +++ b/modules/features2d/include/opencv2/features2d/features2d.hpp @@ -1470,7 +1470,7 @@ protected: SURF surf; }; -DescriptorExtractor* createDescriptorExtractor( const string& descriptorExtractorType ); +CV_EXPORTS DescriptorExtractor* createDescriptorExtractor( const string& descriptorExtractorType ); /****************************************************************************************\ * Distance * @@ -1873,7 +1873,7 @@ void BruteForceMatcher::matchImpl( const Mat& descriptors_1, const Mat } -DescriptorMatcher* createDescriptorMatcher( const string& descriptorMatcherType ); +CV_EXPORTS DescriptorMatcher* createDescriptorMatcher( const string& descriptorMatcherType ); /****************************************************************************************\ * GenericDescriptorMatch * @@ -2170,7 +2170,7 @@ protected: Params params; }; -GenericDescriptorMatch* createDescriptorMatch( const string& genericDescritptorMatchType, const string ¶msFilename = string () ); +CV_EXPORTS GenericDescriptorMatch* createGenericDescriptorMatch( const string& genericDescritptorMatchType, const string ¶msFilename = string () ); /****************************************************************************************\ * VectorDescriptorMatch * \****************************************************************************************/ diff --git a/modules/features2d/src/descriptors.cpp b/modules/features2d/src/descriptors.cpp index 7c1b9d57bbbc9b4fad7244b9d2d9549eef07c1f5..362351c02518edc59f97c1b54c38d268db05dfd9 100644 --- a/modules/features2d/src/descriptors.cpp +++ b/modules/features2d/src/descriptors.cpp @@ -40,7 +40,6 @@ //M*/ #include "precomp.hpp" -#include //#define _KDTREE @@ -335,7 +334,7 @@ void GenericDescriptorMatch::clear() collection.clear(); } -GenericDescriptorMatch* createDescriptorMatch( const string& genericDescritptorMatchType, const string ¶msFilename ) +GenericDescriptorMatch* createGenericDescriptorMatch( const string& genericDescritptorMatchType, const string ¶msFilename ) { GenericDescriptorMatch *descriptorMatch = 0; if( ! genericDescritptorMatchType.compare ("ONEWAY") ) diff --git a/samples/cpp/generic_descriptor_match.cpp b/samples/cpp/generic_descriptor_match.cpp index 863e4197b358f5d00aeb665acf2f0d725d088242..753af734c4673538e72b028241315494c4614dc0 100644 --- a/samples/cpp/generic_descriptor_match.cpp +++ b/samples/cpp/generic_descriptor_match.cpp @@ -1,8 +1,9 @@ -#include -#include +#include "opencv2/core/core.hpp" +#include "opencv2/calib3d/calib3d.hpp" +#include "opencv2/imgproc/imgproc.hpp" +#include "opencv2/features2d/features2d.hpp" #include - -#include +#include using namespace cv; @@ -23,7 +24,7 @@ int main(int argc, char** argv) std::string alg_name = std::string(argv[3]); std::string params_filename = std::string(argv[4]); - GenericDescriptorMatch *descriptorMatch = GenericDescriptorMatch::CreateDescriptorMatch (alg_name, params_filename); + GenericDescriptorMatch *descriptorMatch = createGenericDescriptorMatch(alg_name, params_filename); if( descriptorMatch == 0 ) { printf ("Cannot create descriptor\n"); diff --git a/tests/cv/src/adetectordescriptor_evaluation.cpp b/tests/cv/src/adetectordescriptor_evaluation.cpp index c8d7bc77c1ad02826721e6068a62fcdd96cd6ab1..15049d0c8785862e98c1a3394d4ad8b624c725e9 100644 --- a/tests/cv/src/adetectordescriptor_evaluation.cpp +++ b/tests/cv/src/adetectordescriptor_evaluation.cpp @@ -1325,8 +1325,8 @@ void DescriptorQualityTest::writePlotData( int di ) const void DescriptorQualityTest::readAlgorithm( ) { - defaultDescMatch = createDescriptorMatch( algName ); - specificDescMatch = createDescriptorMatch( algName ); + defaultDescMatch = createGenericDescriptorMatch( algName ); + specificDescMatch = createGenericDescriptorMatch( algName ); if( defaultDescMatch == 0 ) {