- 一、概述
- 二、模块
- 2.1 主要模块
- Core functionality">core. Core functionality
- Image Processing">imgproc. Image Processing
- Image file reading and writing">imgcodecs. Image file reading and writing
- Video I/O">videoio. Video I/O
- High-level GUI">highgui. High-level GUI
- Video Analysis">video. Video Analysis
- Camera Calibration and 3D Reconstruction">calib3d. Camera Calibration and 3D Reconstruction
- 2D Features Framework">feature2d. 2D Features Framework
- Object Detection">objdetect. Object Detection
- Deep Neural Network module">dnn. Deep Neural Network module
- Machine Learning">ml. Machine Learning
- Clustering and Search in Multi-Dimensional Spaces">flann. Clustering and Search in Multi-Dimensional Spaces
- Computational Photography">photo. Computational Photography
- Images stitching">stitching. Images stitching
- Graph API">gapi. Graph API
- 2.2 额外模块
- Alpha Matting">alphamat. Alpha Matting
- ArUco Marker Detection">aruco. ArUco Marker Detection
- Barcode detecting and decoding methods">barcode. Barcode detecting and decoding methods
- Improved Background-Foreground Segmentation Methods">bgsegm. Improved Background-Foreground Segmentation Methods
- Biologically inspired vision models and derivated tools">bioinspired. Biologically inspired vision models and derivated tools
- Custom Calibration Pattern for 3D reconstruction">ccalib. Custom Calibration Pattern for 3D reconstruction
- Operations on Matrices">cudaarithm. Operations on Matrices
- Background Segmentation">cudabgsegm. Background Segmentation
- Video Encoding/Decoding">cudacodec. Video Encoding/Decoding
- Feature Detection and Description">cudafeatures2d. Feature Detection and Description
- Image Filtering">cudafilters. Image Filtering
- Image Processing">cudaimgproc. Image Processing
- Legacy support">cudalegacy. Legacy support
- Object Detection">cudaobjdetect. Object Detection
- Optical Flow">cudaoptflow. Optical Flow
- Stereo Correspondence">cudastereo. Stereo Correspondence
- Image Warping">cudawarping. Image Warping
- Device layer">cudev. Device layer
- GUI for Interactive Visual Debugging of Computer Vision Programs">cvv. GUI for Interactive Visual Debugging of Computer Vision Programs
- Framework for working with different datasets">datasets. Framework for working with different datasets
- DNN used for object detection">dnn_objdetect. DNN used for object detection
- DNN used for super resolution">dnn_superres. DNN used for super resolution
- Deformable Part-based Models">dpm. Deformable Part-based Models
- Face Analysis">face. Face Analysis
- Drawing UTF-8 strings with freetype/harfbuzz">freetype. Drawing UTF-8 strings with freetype/harfbuzz
- Image processing based on fuzzy mathematics">fuzzy. Image processing based on fuzzy mathematics
- Hierarchical Data Format I/O routines">hdf. Hierarchical Data Format I/O routines
- Hierarchical Feature Selection for Efficient Image Segmentation">hfs. Hierarchical Feature Selection for Efficient Image Segmentation
- The module brings implementations of different image hashing algorithms.">img_hash. The module brings implementations of different image hashing algorithms.
- The module brings implementations of intensity transformation algorithms to adjust image contrast.">intensity_transform. The module brings implementations of intensity transformation algorithms to adjust image contrast.
- Julia bindings for OpenCV">julia. Julia bindings for OpenCV
- Binary descriptors for lines extracted from an image">line_descriptor. Binary descriptors for lines extracted from an image
- Macbeth Chart module">mcc. Macbeth Chart module
- Optical Flow Algorithms">optflow. Optical Flow Algorithms
- OGRE 3D Visualiser">ovis. OGRE 3D Visualiser
- Phase Unwrapping API">phase_unwrapping. Phase Unwrapping API
- Plot function for Mat data">plot. Plot function for Mat data
- Image Quality Analysis (IQA) API">quality. Image Quality Analysis (IQA) API
- silhouette based 3D object tracking">rapid. silhouette based 3D object tracking
- Image Registration">reg. Image Registration
- RGB-Depth Processing">rgbd. RGB-Depth Processing
- Saliency API">saliency. Saliency API
- Structure From Motion">sfm. Structure From Motion
- Shape Distance and Matching">shape. Shape Distance and Matching
- Stereo Correspondance Algorithms">stereo. Stereo Correspondance Algorithms
- Structured Light API">structured_light. Structured Light API
- Super Resolution">superres. Super Resolution
- Surface Matching">surface_matching. Surface Matching
- Scene Text Detection and Recognition">text. Scene Text Detection and Recognition
- Tracking API">tracking. Tracking API
- Video Stabilization">videostab. Video Stabilization
- 3D Visualizer">viz. 3D Visualizer
- WeChat QR code detector for detecting and parsing QR code.">wechat_qrcode. WeChat QR code detector for detecting and parsing QR code.
- Extra 2D Features Framework">xfeatures2d. Extra 2D Features Framework
- Extended Image Processing">ximgproc. Extended Image Processing
- Extended object detection">xobjdetect. Extended object detection
- Additional photo processing algorithms">xphoto. Additional photo processing algorithms
- 2.3 支持语言
- 2.1 主要模块
一、概述
OpenCV(Open Source Computer Vision Library官网)是一个包含数百种计算机视觉算法的开源库。本文档描述了OpenCV 2.X API(本质是一个C++ API)。
OpenCV由模块化构成,其中包含多个共享或静态库,其核心包含以下模块
- Core functionanlity(core)核心功能:包含基本数据结构定义,包括稠密多维数组类型Mat和其他模块所需的基本函数;
- Image Processing(imgproc)图像处理:包括线性和非线性图像滤波,图像的几何变换(缩放、仿射和透视变换、基于表格的重映射)、色域转换、直方图等;
- Video Analysis(video)视频分析:包括运动估计、背景消除和目标跟踪算法的视频分析模块;
- Camera Calibration and 3D Reconstruction(calib3d)相机标定和三维重建:包含基础的多视图几何、单目和立体视觉标定、位姿估计、立体匹配和元素三维重建等算法;
- 2D Features Framework(features2d)2D特征框架:包含显著特征检测器、描述符和描述符匹配器;
- Object Detection(objdetect)目标检测:包含目标检测和预定义类别的部分实例(人脸、眼睛、杯子、人物、汽车等);
- High-level GUI(highgui)高级GUI:提供方便调用的简单GUI接口;
- Video I/O(videoio)视频I/O:提供方便调用的视频采集和解码接口。
- …一些其他辅助模块,例如FLANN和Google单元测试封装、Python绑定等。
首先,请务必熟悉库中常见的API概念:
- cv Namespace:所有的OpenCV 类和函数均放置于cv命名空间中。因此,要在代码中调用时,请使用cv::符或using namespace cv;指令;
- Automatic Memory Management:OpenCV自动处理所有内存;
- Automatic Allocation of the Output Data:自动根据输出函数参数分配内存;
- Saturation Arithmetics:饱和算法
- Fixed Pixel Types. Limited Use of Templates:固定像素类型,限制模板使用
- InputArray and OutputArray:输入数组和输出数组
- Error Handing:异常处理
- Multi-threading and Re-enterability:多线程和可重入性
二、模块
2.1 主要模块
core. Core functionality
- Basic structures
- C structures and operations
- Operations on arrays
- Asynchronous API
- XML/YAML Persistence
- Clustering
- Utility and system functions and macros
- OpenGL interoperability
- Intel IPP Asychronous C/C++ Converters
- Optimization Algorithms
- DirectX interoperability
- Eigen support
- OpenCL support
- Intel VA-API/OpenCL(CL-VA) interoperability
- Hardware Acceleration Layer
-
imgproc. Image Processing
- Geometric Image Transformations
- Miscellaneous Image Transformations
- Drawing Functions
- Color Space Conversions
- ColorMaps in OpenCV
- Planar subdivision
- Histograms
- Structural Analysis and Shape Descriptors
- Motion Analysis and Object Tracking
- Feature Detection
- Object Detection
- Image Segmentation
- C API
-
imgcodecs. Image file reading and writing
C API
- Flags used for image file reading and writing
- iOS glue
-
videoio. Video I/O
- Additional flage for video I/O API backends
- Hardware-accelerated video decoding and encoding
- C API for video I/O
- iOS glue for video I/O
- WinRT glue for video I/O
Query I/O API backends registry
highgui. High-level GUI
Flags related creating and manipulationg HighGUI windows and mouse events
- OpenGL support
- Qt New Functions
- WinRT support
-
video. Video Analysis
- Object Tracking
-
calib3d. Camera Calibration and 3D Reconstruction
-
feature2d. 2D Features Framework
- Descriptor Matchers
- Drawing Function of Keypoints and Matches
- Object Categorization
-
objdetect. Object Detection
-
dnn. Deep Neural Network module
Utilities for New Layers Reistration
ml. Machine Learning
flann. Clustering and Search in Multi-Dimensional Spaces
photo. Computational Photography
- Denoising
- HDR imaging
- Contrast Preserving Decolorization
- Seamless Cloning
- Non-Photorealistic Rendering
-
stitching. Images stitching
- Rotation Estimation
- Autocalibration
- Images Warping
- Seam Estimation
- Exposure Compensation
-
gapi. Graph API
2.2 额外模块
alphamat. Alpha Matting
aruco. ArUco Marker Detection
barcode. Barcode detecting and decoding methods
bgsegm. Improved Background-Foreground Segmentation Methods
bioinspired. Biologically inspired vision models and derivated tools
ccalib. Custom Calibration Pattern for 3D reconstruction
cudaarithm. Operations on Matrices
- Per-element Operations
- Matrix Reductions
-
cudabgsegm. Background Segmentation
cudacodec. Video Encoding/Decoding
cudafeatures2d. Feature Detection and Description
cudafilters. Image Filtering
cudaimgproc. Image Processing
- Histogram Calculation
- Hough Transform
-
cudalegacy. Legacy support
- NPPST Image Processing
-
cudaobjdetect. Object Detection
cudaoptflow. Optical Flow
cudastereo. Stereo Correspondence
cudawarping. Image Warping
cudev. Device layer
cvv. GUI for Interactive Visual Debugging of Computer Vision Programs
datasets. Framework for working with different datasets
- Face Recognition
- Gesture Recognition
- Human Pose Estimation
- Image Registration
- Image Segmentation
- Multiview Stereo Matching
- Object Recognition
- Pedestrian Detection
- SLAM
- Super Resolution
- Text Recognition
-
dnn_objdetect. DNN used for object detection
dnn_superres. DNN used for super resolution
dpm. Deformable Part-based Models
face. Face Analysis
freetype. Drawing UTF-8 strings with freetype/harfbuzz
fuzzy. Image processing based on fuzzy mathematics
- Math with F1-transform support
-
hdf. Hierarchical Data Format I/O routines
Hierarchical Data Format version 5
hfs. Hierarchical Feature Selection for Efficient Image Segmentation
img_hash. The module brings implementations of different image hashing algorithms.
intensity_transform. The module brings implementations of intensity transformation algorithms to adjust image contrast.
julia. Julia bindings for OpenCV
line_descriptor. Binary descriptors for lines extracted from an image
mcc. Macbeth Chart module
-
optflow. Optical Flow Algorithms
ovis. OGRE 3D Visualiser
phase_unwrapping. Phase Unwrapping API
plot. Plot function for Mat data
quality. Image Quality Analysis (IQA) API
rapid. silhouette based 3D object tracking
reg. Image Registration
rgbd. RGB-Depth Processing
saliency. Saliency API
sfm. Structure From Motion
- Fundamental
- Input/Output
- Numeric
- Projection
- Robust Estimation
- Triangulation
- Reconstruction
-
shape. Shape Distance and Matching
stereo. Stereo Correspondance Algorithms
structured_light. Structured Light API
superres. Super Resolution
surface_matching. Surface Matching
text. Scene Text Detection and Recognition
-
tracking. Tracking API
-
videostab. Video Stabilization
-
viz. 3D Visualizer
-
wechat_qrcode. WeChat QR code detector for detecting and parsing QR code.
- Non-free 2D Features Algorithms
Experimental 2D Features Matching Algorithm
xfeatures2d. Extra 2D Features Framework
- Non-free 2D Features Algorithms
Experimental 2D Features Matching Algorithm
ximgproc. Extended Image Processing
- EdgeBoxes
- Filters
- Superpixels
- Image segmentation
- Fast line detector
- EdgeDrawing
- Fourier descriptors
- Binary morphology on run-length encoded image
xobjdetect. Extended object detection
xphoto. Additional photo processing algorithms
2.3 支持语言
链接