Commit 8ab3fdbc authored by Maria Dimashova's avatar Maria Dimashova

merged regression tests for FeatureDetector, DescriptorExtractor from branch .features2d;

renamed createDetector to createFeatureDetector
parent eab003d0
...@@ -1354,7 +1354,7 @@ protected: ...@@ -1354,7 +1354,7 @@ protected:
SURF surf; SURF surf;
}; };
CV_EXPORTS Ptr<FeatureDetector> createDetector( const string& detectorType ); CV_EXPORTS Ptr<FeatureDetector> createFeatureDetector( const string& detectorType );
/* /*
* Adapts a detector to partition the source image into a grid and detect * Adapts a detector to partition the source image into a grid and detect
......
...@@ -316,7 +316,7 @@ void SurfFeatureDetector::detectImpl( const Mat& image, const Mat& mask, ...@@ -316,7 +316,7 @@ void SurfFeatureDetector::detectImpl( const Mat& image, const Mat& mask,
surf(image, mask, keypoints); surf(image, mask, keypoints);
} }
Ptr<FeatureDetector> createDetector( const string& detectorType ) Ptr<FeatureDetector> createFeatureDetector( const string& detectorType )
{ {
FeatureDetector* fd = 0; FeatureDetector* fd = 0;
if( !detectorType.compare( "FAST" ) ) if( !detectorType.compare( "FAST" ) )
......
...@@ -651,7 +651,7 @@ int main(int argc, char** argv) ...@@ -651,7 +651,7 @@ int main(int argc, char** argv)
Size calibratedImageSize; Size calibratedImageSize;
readCameraMatrix(intrinsicsFilename, cameraMatrix, distCoeffs, calibratedImageSize); readCameraMatrix(intrinsicsFilename, cameraMatrix, distCoeffs, calibratedImageSize);
Ptr<FeatureDetector> detector = createDetector(detectorName); Ptr<FeatureDetector> detector = createFeatureDetector(detectorName);
Ptr<DescriptorExtractor> descriptorExtractor = createDescriptorExtractor(descriptorExtractorName); Ptr<DescriptorExtractor> descriptorExtractor = createDescriptorExtractor(descriptorExtractorName);
string modelIndexFilename = format("%s_segm/frame_index.yml", modelName); string modelIndexFilename = format("%s_segm/frame_index.yml", modelName);
......
...@@ -143,7 +143,7 @@ int main(int argc, char** argv) ...@@ -143,7 +143,7 @@ int main(int argc, char** argv)
ransacReprojThreshold = atof(argv[5]); ransacReprojThreshold = atof(argv[5]);
cout << "< Creating detector, descriptor extractor and descriptor matcher ..." << endl; cout << "< Creating detector, descriptor extractor and descriptor matcher ..." << endl;
Ptr<FeatureDetector> detector = createDetector( argv[1] ); Ptr<FeatureDetector> detector = createFeatureDetector( argv[1] );
Ptr<DescriptorExtractor> descriptorExtractor = createDescriptorExtractor( argv[2] ); Ptr<DescriptorExtractor> descriptorExtractor = createDescriptorExtractor( argv[2] );
Ptr<DescriptorMatcher> descriptorMatcher = createDescriptorMatcher( "BruteForce" ); Ptr<DescriptorMatcher> descriptorMatcher = createDescriptorMatcher( "BruteForce" );
cout << ">" << endl; cout << ">" << endl;
......
...@@ -686,8 +686,8 @@ inline void readKeypoints( FileStorage& fs, vector<KeyPoint>& keypoints, int img ...@@ -686,8 +686,8 @@ inline void readKeypoints( FileStorage& fs, vector<KeyPoint>& keypoints, int img
void DetectorQualityTest::readAlgorithm () void DetectorQualityTest::readAlgorithm ()
{ {
defaultDetector = createDetector( algName ); defaultDetector = createFeatureDetector( algName );
specificDetector = createDetector( algName ); specificDetector = createFeatureDetector( algName );
if( defaultDetector == 0 ) if( defaultDetector == 0 )
{ {
ts->printf(CvTS::LOG, "Algorithm can not be read\n"); ts->printf(CvTS::LOG, "Algorithm can not be read\n");
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment