Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cv2 package got renamed to opencv-python and is now at 4.8.0.76 #140

Closed
mmokrejs opened this issue Aug 29, 2023 · 2 comments
Closed

cv2 package got renamed to opencv-python and is now at 4.8.0.76 #140

mmokrejs opened this issue Aug 29, 2023 · 2 comments
Milestone

Comments

@mmokrejs
Copy link

mmokrejs commented Aug 29, 2023

Hi,
please update the Documentation explaining how to instal cv2 package. Seems it got renamed to opencv-python. Quoting from https://pypi.org/project/opencv-python/ :

Q: Why the package and import are different (opencv-python vs. cv2)?

A: It's easier for users to understand opencv-python than cv2 and it makes it easier to find the package with search engines. cv2 (old interface in old OpenCV versions was named as cv) is the name that OpenCV developers chose when they created the binding generators. This is kept as the import name to be consistent with different kind of tutorials around the internet. Changing the import name or behaviour would be also confusing to experienced users who are accustomed to the import cv2.

Still, dvr-scan bails on me with:

[DVR-Scan] Method CNT is not available. To enable it, install a version of the OpenCV package cv2 that includes support for it.

Probably it tries to import the library under the old name?

$ pip list
Package           Version
----------------- --------
appdirs           1.4.4
click             8.1.3
cv2-tools         2.4.0
dvr-scan          1.5.1
ImageHash         4.3.1
numpy             1.24.3
opencv-python     4.8.0.76
Pillow            10.0.0
pip               23.2.1
platformdirs      3.5.3
python-constraint 1.4.0
PyWavelets        1.4.1
scenedetect       0.6.1
scipy             1.11.2
screeninfo        0.8.1
setuptools        67.7.2
tqdm              4.65.0
$

Is it compatible with 4.8.0.76 anyway?
Thank you.

@Breakthrough
Copy link
Owner

Hello @mmokrejs ; Thanks for pointing this out, that is useful to include I agree.

To use CNT, I think you may also need the opencv-contrib-python as well. Can you install that and see if it works?

Thank you!

@mmokrejs
Copy link
Author

mmokrejs commented Sep 9, 2023

Hi @Breakthrough , right, pip install opencv-contrib-python did the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants