Unofficial stubs for the opencv-python package.
Project description
OpenCV stubs
Unofficial python stubs for the opencv-python package.
This package includes all the functions, classes and constants (please open an issue if you find a missing one).
For some functions, OpenCV may handle more types than defined in this package. If you would like a type/function to be added or modified, please open an issue or a PR. There may also be a few errors as some types have been added progrmmatically. Please open an issue if you see one.
The typing is still a work in progress, if you want a function/method to be added first you can open an issue.
The stubs include the docstrings as they are otherwise not available in the IDE (as far as I know).
These stubs are a temporary help until official ones are made (see this issue).
Installation
The package is available on pypi here, you can install it with:
pip install opencv-stubs
The dependency on opencv is optional, and can be accessed with:
pip install opencv-stubs[opencv]
pip install opencv-stubs[opencv-contrib]
pip install opencv-stubs[opencv-headless]
Acknowledgements
A stub file with all the cv2 functions can be found on the Microsoft stubs repo. This package reused those functions and added typing.
TODO:
- Fix missing "..." (
"""\n\n/"""\n ...\n\n
) - Do something about
cv2.gapi.cv
,cv2.utils.cv2
andcv2.mat_wrapper.cv
(do not duplicate everything if possible). - Handle cases like
cv2.misc.version.cv2.misc.version.cv2.misc.get_ocv_version()
. - Only include the
opencv-contrib
specific stubs when usingopencv-stubs[opencv-contrib]
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for opencv_stubs-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4c1c2d73780ccb083ec41409d9d526ccd04b2ef31eacd6e717d4117021832d8 |
|
MD5 | bca7fdac792ae82ceffd5717f3574e58 |
|
BLAKE2b-256 | 3c06eb24d557f00cd23da567cea7f83e09f68c804a0b5a814159a0b5534ebeca |