diff --git a/modules/stitching/include/opencv2/stitching/detail/matchers.hpp b/modules/stitching/include/opencv2/stitching/detail/matchers.hpp index ef4684fd05..cd9749ca8b 100644 --- a/modules/stitching/include/opencv2/stitching/detail/matchers.hpp +++ b/modules/stitching/include/opencv2/stitching/detail/matchers.hpp @@ -59,7 +59,7 @@ struct CV_EXPORTS_W_SIMPLE ImageFeatures { CV_PROP_RW int img_idx; CV_PROP_RW Size img_size; - std::vector keypoints; + CV_PROP_RW std::vector keypoints; CV_PROP_RW UMat descriptors; CV_WRAP std::vector getKeypoints() { return keypoints; }; }; diff --git a/modules/stitching/misc/python/test/test_stitching.py b/modules/stitching/misc/python/test/test_stitching.py index 719f0583f2..0d66182fb8 100644 --- a/modules/stitching/misc/python/test/test_stitching.py +++ b/modules/stitching/misc/python/test/test_stitching.py @@ -28,6 +28,9 @@ class stitching_detail_test(NewOpenCVTests): imgFea = cv.detail.computeImageFeatures2(finder,img) self.assertIsNotNone(imgFea) + # Added Test for PR #21180 + self.assertIsNotNone(imgFea.keypoints) + matcher = cv.detail_BestOf2NearestMatcher(False, 0.3) self.assertIsNotNone(matcher) matcher = cv.detail_AffineBestOf2NearestMatcher(False, False, 0.3)