Finding documentation, help, and updates
OpenCV's documentation can be found at http://docs.opencv.org/, where you can either read it online or download it for offline reading. If you write code on airplanes or other places without internet access, you will definitely want to keep offline copies of the documentation.
The documentation includes a combined API reference for OpenCV's C++ API and its Python API. When you look up a class or function, be sure to read the section under the heading Python.
OpenCV's Python module is named
cv2
. The 2 incv2
has nothing to do with the version number of OpenCV; we really are using OpenCV 5. Historically, OpenCV had acv
Python module that wrapped a now-obsolete C version of the library. Thecv
module was removed in OpenCV 4.Still, in the official OpenCV 5 samples and in some other authors’ samples, you might see valid Python code such as the following, which imports the
cv2
module and gives it a local alias,cv
:
import...