Skip to main content

PyOpenCV - A Python wrapper for OpenCV 2.x using Boost.Python and NumPy

Project description

PyOpenCV brings Willow Garage’s Open Source Computer Vision Library (OpenCV) verion 2.x to Python. The package takes a completely new and different approach in wrapping OpenCV from traditional swig-based and ctypes-based approaches. It is intended to be a successor of ctypes-opencv and to provide Python bindings for OpenCV 2.x. Ctypes-based approaches like ctypes-opencv, while being very flexible at wrapping functions and structures, are weak at wrapping OpenCV’s C++ interface. On the other hand, swig-based approaches flatten C++ classes and create countless memory management issues. In PyOpenCV, we use Boost.Python, a C++ library which enables seamless interoperability between C++ and Python. PyOpenCV will offer a better solution than both ctypes-based and swig-based wrappers. Its main features include:

  • A Python interface similar to the new C++ interface of OpenCV 2.x, including features that are available in the existing C interface but not yet in the C++ interface.

  • Access to C++ data structures in Python.

  • Elimination of memory management issues. The user never has to worry about memory management.

  • Ability to convert between OpenCV’s Mat and arrays used in wxWidgets, PyGTK, and PIL.

  • OpenCV extensions: classes DifferentialImage, IntegralImage, and IntegralHistogram.

To the best of our knowledge, PyOpenCV is the largest wrapper among existing Python wrappers for OpenCV. It exposes to Python 200+ classes and 500+ free functions of OpenCV 2.x, including those instantiated from templates.

In addition, we use NumPy to provide fast indexing and slicing functionality to OpenCV’s dense data types like Vec-like, Point-like, Rect-like, Size-like, Scalar, Mat, and MatND, and to offer the user an option to work with their multi-dimensional arrays in NumPy. It is well-known that NumPy is one of the best packages (if not the best) for dealing with multi-dimensional arrays in Python. OpenCV 2.x provides a new C++ generic programming approach for matrix manipulation (i.e. MatExpr). It is a good attempt in C++. However, in Python, a package like NumPy is without a doubt a better solution. By incorporating NumPy into PyOpenCV to replace OpenCV 2.x’s MatExpr approach, we seek to bring OpenCV and NumPy closer together, and offer a package that inherits the best of both world: fast computer vision functionality (OpenCV) and fast multi-dimensional array computation (NumPy).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyopencv-2.1.0.wr1.1.0.tar.gz (361.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyopencv-2.1.0.wr1.1.0.win32-py2.6.exe (8.4 MB view details)

Uploaded Source

File details

Details for the file pyopencv-2.1.0.wr1.1.0.tar.gz.

File metadata

File hashes

Hashes for pyopencv-2.1.0.wr1.1.0.tar.gz
Algorithm Hash digest
SHA256 7c973c4437ebc0846f351018c5f6afe7d106d3af600175f39f46d97f99e54313
MD5 ef3a341b7679a26dbfa5d68f74408d11
BLAKE2b-256 a83f6971337f6d33eb71e5684042ba1348288c4001c319d76d92403010387509

See more details on using hashes here.

File details

Details for the file pyopencv-2.1.0.wr1.1.0.win32-py2.6.exe.

File metadata

File hashes

Hashes for pyopencv-2.1.0.wr1.1.0.win32-py2.6.exe
Algorithm Hash digest
SHA256 2f04d83493351c1428bb36b473f045644367cdb041b05cf4615c4d336089f2ee
MD5 e0d277901af4165e3a9872851e6aa0e6
BLAKE2b-256 5e743a21596a05159a73baeda4caaf8169b85ed0b29114e94a7a6278f529e680

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page