Welcome to the OpenCV Python API documentation! This guide provides an overview of the core modules, functions, and classes available in OpenCV for Python developers. 🐍
Core Modules 📦
cv2.core
: Fundamental operations like matrix manipulation and data structures.cv2.imgproc
: Image processing algorithms including filtering, color conversion, and morphology.cv2.video
: Video capture, analysis, and processing tools.cv2.objdetect
: Object detection and tracking functionalities.cv2.ml
: Machine learning models and algorithms.
Quick Start Example 📌
Here's a simple code snippet to get you started:
import cv2
# Read an image
img = cv2.imread("image.jpg")
# Convert to grayscale
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
# Display the result
cv2.imshow("Grayscale Image", gray)
cv2.waitKey(0)
Further Reading 📚
For detailed information on specific modules, visit our official documentation or explore the OpenCV GitHub repository for source code and examples.