You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
New version of opencv-python gets isntalled, stitching does not work with it #298
When stitching is installed it installs opencv-python version 5.0.0.93. But stitching does not work with that and gets error AttributeError: module 'cv2' has no attribute 'BRISK_create'.
user@pc:~/python_scripts$ uv venv test --python 3.13
Using CPython 3.13.11
Creating virtual environment at: test
Activate with: source test/bin/activate
user@pc:~/python_scripts$ source test/bin/activate
(test) user@pc:~/python_scripts$ uv pip install stitching
Using Python 3.13.11 environment at: test
Resolved 6 packages in 159ms
Prepared 3 packages in 1.31s
Installed 6 packages in 16ms
+ largestinteriorrectangle==0.2.1
+ llvmlite==0.49.0
+ numba==0.67.0
+ numpy==2.5.2
+ opencv-python==5.0.0.93
+ stitching==0.6.1
(test) user@pc:~/python_scripts$ stitch s/*.png --output "s.png" --affine --try_use_gpu --blender_type "feather" --no-crop --blend_strength 1
Traceback (most recent call last):
File "/home/user/python_scripts/test/bin/stitch", line 4, in <module>
from stitching.cli.stitch import main
File "/home/user/python_scripts/test/lib/python3.13/site-packages/stitching/__init__.py", line 1, in <module>
from .stitcher import AffineStitcher, Stitcher # noqa: F401
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/python_scripts/test/lib/python3.13/site-packages/stitching/stitcher.py", line 10, in <module>
from .feature_detector import FeatureDetector
File "/home/user/python_scripts/test/lib/python3.13/site-packages/stitching/feature_detector.py", line 9, in <module>
class FeatureDetector:
...<38 lines>...
return cv.drawKeypoints(img, keypoints, None, **kwargs)
File "/home/user/python_scripts/test/lib/python3.13/site-packages/stitching/feature_detector.py", line 16, in FeatureDetector
DETECTOR_CHOICES["brisk"] = cv.BRISK_create
^^^^^^^^^^^^^^^
AttributeError: module 'cv2' has no attribute 'BRISK_create'
The requirements.txt says opencv-python==4.10.0.84 but for some reason that gets ignored and newer version is installed instead.
Forcing intallation of older version fixes this uv pip install --force-reinstall -v "opencv-python==4.10.0.84".
requirements.txt is only used for testing/local development. https://github.com/OpenStitching/stitching/blob/main/setup.cfg is responsible for the package manager and does not have upper bounds (and it shouldnt), I rather want to adjust stitching to the breaking changes of 5.x
Activity
lukasalexanderweber commentedon Aug 14, 2026
Thanks for reporting! The Tests fail when upgrading to 5.x: #299. Feel free to propose a fix, If not I'll look into it when I have time
lukasalexanderweber commentedon Aug 14, 2026
requirements.txt is only used for testing/local development. https://github.com/OpenStitching/stitching/blob/main/setup.cfg is responsible for the package manager and does not have upper bounds (and it shouldnt), I rather want to adjust stitching to the breaking changes of 5.x
lukasalexanderweber commentedon Aug 14, 2026
But till we adjust to 5.x it might even be a good idea to introduce an upper bound
lukasalexanderweber commentedon Aug 14, 2026
https://github.com/opencv/opencv/wiki/OpenCV-4-to-5-migration#features2d--features
The following detectors and descriptors have been moved to opencv_contrib (xfeatures2d): SURF, BRIEF, FREAK, LUCID, DAISY, and several others.
lukasalexanderweber commentedon Aug 14, 2026
Here the cleanup for stitching_detailed: opencv/opencv#25292