Skip to main content

Open Source Computer Vision Library

Build powerful computer vision applications with the world’s most popular open-source CV library. Process images, detect objects, and deploy AI models across every platform.

Quick start

Get up and running with OpenCV in minutes

1

Install OpenCV

Choose your preferred installation method based on your language and platform.
pip install opencv-python
2

Load and display an image

Start with the most basic operation: reading and displaying an image.
import cv2

# Read an image
image = cv2.imread('image.jpg')

# Display the image
cv2.imshow('My Image', image)
cv2.waitKey(0)
cv2.destroyAllWindows()
3

Process your first image

Apply image processing operations like converting to grayscale and edge detection.
import cv2

# Read image
image = cv2.imread('image.jpg')

# Convert to grayscale
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)

# Apply Canny edge detection
edges = cv2.Canny(gray, 100, 200)

# Save the result
cv2.imwrite('edges.jpg', edges)
OpenCV uses BGR color format by default, not RGB. Keep this in mind when working with color images.
4

Explore advanced features

Now you’re ready to explore object detection, face recognition, deep learning, and more.Check out the tutorials or dive into the API reference to learn about specific modules.

Resources

Everything you need to succeed with OpenCV

Tutorials

Step-by-step guides for common computer vision tasks

API Reference

Complete documentation of all OpenCV modules and functions

Examples

Real-world code examples in Python and C++

GitHub Repository

View source code, report issues, and contribute

Ready to get started?

Install OpenCV and build your first computer vision application in minutes

Start Building