From 720be722d10ffd320c78d04facfa7333c02495c8 Mon Sep 17 00:00:00 2001 From: Lukas Weber Date: Fri, 21 Aug 2026 16:40:47 +0200 Subject: [PATCH 1/2] support opencv-python 5.x --- setup.cfg | 2 +- stitching/feature_detector.py | 2 -- tests/stitching_detailed.py | 6 ++++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/setup.cfg b/setup.cfg index fa9c6df..611fda7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -18,7 +18,7 @@ project_urls = [options] packages = find: install_requires = - opencv-python>=4.0.1,<5 + opencv-python>=4.0.1 largestinteriorrectangle include_package_data = True zip_safe = False diff --git a/stitching/feature_detector.py b/stitching/feature_detector.py index 9cf7112..1435655 100644 --- a/stitching/feature_detector.py +++ b/stitching/feature_detector.py @@ -13,8 +13,6 @@ class FeatureDetector: DETECTOR_CHOICES["orb"] = cv.ORB.create DETECTOR_CHOICES["sift"] = cv.SIFT_create - DETECTOR_CHOICES["brisk"] = cv.BRISK_create - DETECTOR_CHOICES["akaze"] = cv.AKAZE_create DEFAULT_DETECTOR = list(DETECTOR_CHOICES.keys())[0] diff --git a/tests/stitching_detailed.py b/tests/stitching_detailed.py index 6b1d0b8..f8f42e6 100644 --- a/tests/stitching_detailed.py +++ b/tests/stitching_detailed.py @@ -39,11 +39,13 @@ except AttributeError: pass try: - FEATURES_FIND_CHOICES["brisk"] = cv.BRISK_create + cv.xfeatures2d_BRISK.create() # check if the function can be called + FEATURES_FIND_CHOICES['brisk'] = cv.xfeatures2d_BRISK.create except AttributeError: print("BRISK not available") try: - FEATURES_FIND_CHOICES["akaze"] = cv.AKAZE_create + cv.xfeatures2d_AKAZE.create() # check if the function can be called + FEATURES_FIND_CHOICES['akaze'] = cv.xfeatures2d_AKAZE.create except AttributeError: print("AKAZE not available") From e516b296a69f2f236f57c386cb23a67e68d87511 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 21 Aug 2026 14:53:49 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/stitching_detailed.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/stitching_detailed.py b/tests/stitching_detailed.py index f8f42e6..8456879 100644 --- a/tests/stitching_detailed.py +++ b/tests/stitching_detailed.py @@ -39,13 +39,13 @@ except AttributeError: pass try: - cv.xfeatures2d_BRISK.create() # check if the function can be called - FEATURES_FIND_CHOICES['brisk'] = cv.xfeatures2d_BRISK.create + cv.xfeatures2d_BRISK.create() # check if the function can be called + FEATURES_FIND_CHOICES["brisk"] = cv.xfeatures2d_BRISK.create except AttributeError: print("BRISK not available") try: - cv.xfeatures2d_AKAZE.create() # check if the function can be called - FEATURES_FIND_CHOICES['akaze'] = cv.xfeatures2d_AKAZE.create + cv.xfeatures2d_AKAZE.create() # check if the function can be called + FEATURES_FIND_CHOICES["akaze"] = cv.xfeatures2d_AKAZE.create except AttributeError: print("AKAZE not available")