From 8f69a81637f04ff526dc36d6435d9e3630347550 Mon Sep 17 00:00:00 2001 From: Abbas Elmas <abbaselmas@gmail.com> Date: Sat, 23 Nov 2024 17:12:22 +0300 Subject: [PATCH 1/2] getDefaultName() added all other contrib feature has this function but tbmr --- modules/xfeatures2d/src/tbmr.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/xfeatures2d/src/tbmr.cpp b/modules/xfeatures2d/src/tbmr.cpp index 36a0a538b7e..b3b4f08ff26 100644 --- a/modules/xfeatures2d/src/tbmr.cpp +++ b/modules/xfeatures2d/src/tbmr.cpp @@ -573,6 +573,11 @@ void TBMR_Impl::detectAndCompute( useProvidedKeypoints); } +String TBMR::getDefaultName() const +{ + return (Feature2D::getDefaultName() + ".TBMR"); +} + Ptr<TBMR> TBMR::create(int _min_area, float _max_area_relative, float _scale, int _n_scale) { @@ -581,4 +586,4 @@ Ptr<TBMR> TBMR::create(int _min_area, float _max_area_relative, float _scale, } } // namespace xfeatures2d -} // namespace cv \ No newline at end of file +} // namespace cv From 0130d808a9226ec315b039fd536d77806a3db1ff Mon Sep 17 00:00:00 2001 From: Abbas Elmas <abbaselmas@gmail.com> Date: Sun, 24 Nov 2024 13:53:06 +0300 Subject: [PATCH 2/2] Update xfeatures2d.hpp missing CV_WRAP String getDefaultName() const CV_OVERRIDE; at --- modules/xfeatures2d/include/opencv2/xfeatures2d.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/xfeatures2d/include/opencv2/xfeatures2d.hpp b/modules/xfeatures2d/include/opencv2/xfeatures2d.hpp index 3793541c238..44f1af92452 100644 --- a/modules/xfeatures2d/include/opencv2/xfeatures2d.hpp +++ b/modules/xfeatures2d/include/opencv2/xfeatures2d.hpp @@ -1209,6 +1209,8 @@ class CV_EXPORTS_W TBMR : public AffineFeature2D CV_WRAP virtual float getScaleFactor() const = 0; CV_WRAP virtual void setNScales(int n_scales) = 0; CV_WRAP virtual int getNScales() const = 0; + + CV_WRAP String getDefaultName() const CV_OVERRIDE; }; /** @brief Estimates cornerness for prespecified KeyPoints using the FAST algorithm