Giter Club home page Giter Club logo

opencv-stubs's Introduction

OpenCV stubs

PyPI PyPI - Implementation PyPI - Python Version PyPI - Downloads License Linting

Unofficial python stubs for the opencv-python package.

Official OpenCV stubs now exist (in OpenCV>=4.8, cf this issue and this PR), so this repo was archived from 2023/03/27 to 2024/04/13.
However I found the official stubs unhelpfull when it came to type hinting, so I'm un-archiving the repo.

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 programmatically. Please open an issue/PR if you see one.

The stubs include the docstrings as they are otherwise not available in IDEs (as far as I know).

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 opencv functions can be found on the Microsoft stubs repo. This package reused those functions (with some added typing).

TODO:

  • Do something about cv2.gapi.cv, cv2.utils.cv2 and cv2.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 using opencv-stubs[opencv-contrib].

opencv-stubs's People

Contributors

hoel-bagard avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

opencv-stubs's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.