Skip to content

Commit 0624411

Browse files
committed
Merge pull request opencv#9624 from nilaykumarpatel:Feature2d_getDefaultName
2 parents 63584bc + 6857870 commit 0624411

File tree

11 files changed

+61
-0
lines changed

11 files changed

+61
-0
lines changed

modules/features2d/include/opencv2/features2d.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ class CV_EXPORTS_W Feature2D : public virtual Algorithm
206206

207207
//! Return true if detector object is empty
208208
CV_WRAP virtual bool empty() const;
209+
CV_WRAP virtual String getDefaultName() const;
209210
};
210211

211212
/** Feature detectors in OpenCV have wrappers with a common interface that enables you to easily switch
@@ -267,6 +268,7 @@ class CV_EXPORTS_W BRISK : public Feature2D
267268
CV_WRAP static Ptr<BRISK> create(int thresh, int octaves, const std::vector<float> &radiusList,
268269
const std::vector<int> &numberList, float dMax=5.85f, float dMin=8.2f,
269270
const std::vector<int>& indexChange=std::vector<int>());
271+
CV_WRAP virtual String getDefaultName() const;
270272
};
271273

272274
/** @brief Class implementing the ORB (*oriented BRIEF*) keypoint detector and descriptor extractor
@@ -340,6 +342,7 @@ class CV_EXPORTS_W ORB : public Feature2D
340342

341343
CV_WRAP virtual void setFastThreshold(int fastThreshold) = 0;
342344
CV_WRAP virtual int getFastThreshold() const = 0;
345+
CV_WRAP virtual String getDefaultName() const;
343346
};
344347

345348
/** @brief Maximally stable extremal region extractor
@@ -399,6 +402,7 @@ class CV_EXPORTS_W MSER : public Feature2D
399402

400403
CV_WRAP virtual void setPass2Only(bool f) = 0;
401404
CV_WRAP virtual bool getPass2Only() const = 0;
405+
CV_WRAP virtual String getDefaultName() const;
402406
};
403407

404408
/** @overload */
@@ -454,6 +458,7 @@ class CV_EXPORTS_W FastFeatureDetector : public Feature2D
454458

455459
CV_WRAP virtual void setType(int type) = 0;
456460
CV_WRAP virtual int getType() const = 0;
461+
CV_WRAP virtual String getDefaultName() const;
457462
};
458463

459464
/** @overload */
@@ -508,6 +513,7 @@ class CV_EXPORTS_W AgastFeatureDetector : public Feature2D
508513

509514
CV_WRAP virtual void setType(int type) = 0;
510515
CV_WRAP virtual int getType() const = 0;
516+
CV_WRAP virtual String getDefaultName() const;
511517
};
512518

513519
/** @brief Wrapping class for feature detection using the goodFeaturesToTrack function. :
@@ -534,6 +540,7 @@ class CV_EXPORTS_W GFTTDetector : public Feature2D
534540

535541
CV_WRAP virtual void setK(double k) = 0;
536542
CV_WRAP virtual double getK() const = 0;
543+
CV_WRAP virtual String getDefaultName() const;
537544
};
538545

539546
/** @brief Class for extracting blobs from an image. :
@@ -600,6 +607,7 @@ class CV_EXPORTS_W SimpleBlobDetector : public Feature2D
600607

601608
CV_WRAP static Ptr<SimpleBlobDetector>
602609
create(const SimpleBlobDetector::Params &parameters = SimpleBlobDetector::Params());
610+
CV_WRAP virtual String getDefaultName() const;
603611
};
604612

605613
//! @} features2d_main
@@ -656,6 +664,7 @@ class CV_EXPORTS_W KAZE : public Feature2D
656664

657665
CV_WRAP virtual void setDiffusivity(int diff) = 0;
658666
CV_WRAP virtual int getDiffusivity() const = 0;
667+
CV_WRAP virtual String getDefaultName() const;
659668
};
660669

661670
/** @brief Class implementing the AKAZE keypoint detector and descriptor extractor, described in @cite ANB13.
@@ -723,6 +732,7 @@ class CV_EXPORTS_W AKAZE : public Feature2D
723732

724733
CV_WRAP virtual void setDiffusivity(int diff) = 0;
725734
CV_WRAP virtual int getDiffusivity() const = 0;
735+
CV_WRAP virtual String getDefaultName() const;
726736
};
727737

728738
//! @} features2d_main

modules/features2d/src/agast.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8169,4 +8169,9 @@ void AGAST(InputArray _img, std::vector<KeyPoint>& keypoints, int threshold, boo
81698169
}
81708170
}
81718171

8172+
String AgastFeatureDetector::getDefaultName() const
8173+
{
8174+
return(Feature2D::getDefaultName() + ".AgastFeatureDetector");
8175+
}
8176+
81728177
} // END NAMESPACE CV

modules/features2d/src/akaze.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,4 +244,10 @@ namespace cv
244244
return makePtr<AKAZE_Impl>(descriptor_type, descriptor_size, descriptor_channels,
245245
threshold, octaves, sublevels, diffusivity);
246246
}
247+
248+
String AKAZE::getDefaultName() const
249+
{
250+
return (Feature2D::getDefaultName() + ".AKAZE");
251+
}
252+
247253
}

modules/features2d/src/blobdetector.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,4 +379,9 @@ Ptr<SimpleBlobDetector> SimpleBlobDetector::create(const SimpleBlobDetector::Par
379379
return makePtr<SimpleBlobDetectorImpl>(params);
380380
}
381381

382+
String SimpleBlobDetector::getDefaultName() const
383+
{
384+
return (Feature2D::getDefaultName() + ".SimpleBlobDetector");
385+
}
386+
382387
}

modules/features2d/src/brisk.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2345,4 +2345,9 @@ Ptr<BRISK> BRISK::create(int thresh, int octaves, const std::vector<float> &radi
23452345
return makePtr<BRISK_Impl>(thresh, octaves, radiusList, numberList, dMax, dMin, indexChange);
23462346
}
23472347

2348+
String BRISK::getDefaultName() const
2349+
{
2350+
return (Feature2D::getDefaultName() + ".BRISK");
2351+
}
2352+
23482353
}

modules/features2d/src/fast.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,5 +512,9 @@ Ptr<FastFeatureDetector> FastFeatureDetector::create( int threshold, bool nonmax
512512
return makePtr<FastFeatureDetector_Impl>(threshold, nonmaxSuppression, type);
513513
}
514514

515+
String FastFeatureDetector::getDefaultName() const
516+
{
517+
return (Feature2D::getDefaultName() + ".FastFeatureDetector");
518+
}
515519

516520
}

modules/features2d/src/feature2d.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,4 +196,9 @@ bool Feature2D::empty() const
196196
return true;
197197
}
198198

199+
String Feature2D::getDefaultName() const
200+
{
201+
return "Feature2D";
202+
}
203+
199204
}

modules/features2d/src/gftt.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,9 @@ Ptr<GFTTDetector> GFTTDetector::create( int _nfeatures, double _qualityLevel,
125125
_minDistance, _blockSize, _useHarrisDetector, _k);
126126
}
127127

128+
String GFTTDetector::getDefaultName() const
129+
{
130+
return (Feature2D::getDefaultName() + ".GFTTDetector");
131+
}
132+
128133
}

modules/features2d/src/kaze.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,4 +196,10 @@ namespace cv
196196
{
197197
return makePtr<KAZE_Impl>(extended, upright, threshold, octaves, sublevels, diffusivity);
198198
}
199+
200+
String KAZE::getDefaultName() const
201+
{
202+
return (Feature2D::getDefaultName() + ".KAZE");
203+
}
204+
199205
}

modules/features2d/src/mser.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,4 +1109,9 @@ Ptr<MSER> MSER::create( int _delta, int _min_area, int _max_area,
11091109
_min_margin, _edge_blur_size));
11101110
}
11111111

1112+
String MSER::getDefaultName() const
1113+
{
1114+
return (Feature2D::getDefaultName() + ".MSER");
1115+
}
1116+
11121117
}

0 commit comments

Comments
 (0)