talira

Open Source Computer Vision Library

open sourceApache-2.0self-hostablefree

OpenCV is the long-running open source computer vision library, written in C++ with official bindings for Python, Java, JavaScript and Objective-C. It covers image processing (filtering, thresholding, contours, geometric warps), feature detection and matching (ORB, SIFT, FAST and, since OpenCV 5, the learned ALIKED and DISK features with the LightGlue matcher), robust estimation of homographies and other geometry with RANSAC-style solvers, image alignment, camera calibration, video capture and analysis, QR code, barcode and ArUco marker detection, and a DNN module that runs ONNX models on CPU, optionally through ONNX Runtime. OpenCV 5 (June 2026) dropped the old C API, moved some legacy modules to opencv_contrib and split the 3D code into geometry, calibration, stereo and point cloud modules. It's Apache-2.0 licensed (BSD before 4.5.0), and Python users install pre-built wheels from PyPI and import it as cv2.

Problems it solves

  • turn a skewed phone picture of a paper document into a flat top-down image like a scanner would give
  • find the four corners of a sheet of paper in a photo and warp it to a straight rectangle
  • overlay a filled-in scanned form exactly on the blank original so every field box lines up
  • detect keypoints in two images and pair up the ones that show the same spot
  • estimate the perspective transform between two pictures and throw away bad point matches
  • refine the alignment of two almost-aligned images to sub-pixel accuracy by maximising their correlation
  • fix a scanned page that came out of the feeder rotated a few degrees
  • clean up a grey, unevenly lit scan into crisp black and white text before running OCR
  • find the checkboxes, table cells and boxes on a scanned form as contours with bounding rectangles
  • find where a logo, stamp or small template image appears inside a larger image
  • decode QR codes and barcodes from camera frames in my app
  • grab frames from a webcam or video file and process each one in real time
  • calibrate a camera from chessboard photos and remove lens distortion from its images
  • run an ONNX detection or segmentation model on a CPU server without installing PyTorch
  • track an object or estimate optical flow from frame to frame in a video

View all 25 problems

Features

  • image filtering, thresholding (including adaptive), morphology, contours and Hough transforms
  • geometric transforms: warpPerspective, warpAffine and remap, revised in OpenCV 5 for accuracy and speed
  • feature detectors and descriptors: ORB, SIFT, FAST, MSER and GoodFeaturesToTrack
  • learned local features ALIKED and DISK and the LightGlue matcher in the Features module (OpenCV 5)
  • homography, fundamental and essential matrix estimation with the USAC robust estimation framework
  • ECC image alignment (findTransformECC) for sub-pixel registration
  • template matching
  • camera calibration, including a multi-view calibration pipeline in OpenCV 5
  • stereo depth estimation and point cloud, mesh and TSDF processing
  • video capture and writing, optical flow and object tracking
View 10 more
  • QR code, barcode, ArUco and ChArUco detection
  • DNN module that runs ONNX models, with an optional ONNX Runtime backend
  • vision-language model inference in the new DNN engine (OpenCV 5)
  • image stitching and computational photography (inpainting, denoising, HDR)
  • image codecs for JPEG, PNG, WebP, AVIF, OpenEXR and more
  • C++ core with Python, Java, JavaScript (WebAssembly) and Objective-C bindings
  • pre-built Python wheels, including headless builds for servers and Docker
  • extra modules in the opencv_contrib repository
  • Android SDK and iOS framework builds published with each release
  • Hugging Face collection of small ONNX computer vision models

Limitations

  • No CUDA GPU acceleration in the PyPI wheels: the pip packages are CPU-only, and CUDA modules need a build from source1
  • Patented non-free algorithms such as SURF aren't in the pip packages: they can't be distributed as binaries (SIFT is included)1

Capabilities

Has official SDKsplan not known

Alternatives

The same job

These do what OpenCV does.

  1. ImageMagick The open-source suite for image creation, conversion, and batch manipulation
  2. XFeat Accelerated features for lightweight image matching

Compare OpenCV with the top 3