OpenCV最新版本号为 4.5.5,发行版本中共有 72 个模块,其中主要模块有16个,附加模块有 56 个。
主模块源码地址 opencv/opencv at 4.5.5 (github.com)
附加模块源码地址 opencv/opencv_contrib at 4.5.5 (github.com)
主模块就是从官网下载的预编译版的opencv库中包含的模块,下载后开箱即用。额外模块是一些额外提供的功能模块,这里的模块可能是没有测试稳定的新功能,所以没能作为官方发行版本的一部分,也可能是涉及到一些专利代码,只能放到附加模块中。
主模块
- core. Core functionality,核心模块,定义了基础类型和基本函数,是其他模块的基础。
- imgproc. Image Processing,图像处理算法模块,线性或非线性滤波,图像变换等功能。
- imgcodecs. Image file reading and writing,各图像格式的编解码功能。
- videoio. Video I/O,视频捕捉和视频编解码器。
- highgui. High-level GUI,实现了一个简单好用的界面库,显示图像,创建简单的控件等。
- video. Video Analysis,视频分析模块,包括运动估计,背景减法和目标跟踪算法。
- calib3d. Camera Calibration and 3D Reconstruction,多视图几何算法,单一和立体相机校准,目标位姿估计,立体匹配,以及三维重建等算法,相机校准。
- features2d. 2D Features Framework,二维特征检测器、描述符和描述符匹配器。
- objdetect. Object Detection,人脸、眼睛、人体、车辆等目标检测。
- dnn. Deep Neural Network module,神经网络相关,构造神经网络、模型加载推理等。
- ml. Machine Learning,机器学习相关,包含 SVM, MLP, LR, DT 等常见的统计机器学习模型,支持模型训练和预测。 flann. Clustering and Search in Multi-Dimensional Spaces,快速最近邻逼近搜索函数库,角点特征匹配。
- photo. Computational Photography,计算摄影相关,包含图像修复和去噪等功能。
- stitching. Images stitching,图像拼接函数库,特征点提取和配准、接缝估计、曝光补偿、图片混合等。
- gapi. Graph API,即Graph API,高效图像处理 pipeline 引擎集成为opencv_gapi模块,用来加速图像处理。添加CPU_BASELINE=AVX2编译选项可以获得比原来15~30%的速度提升。
附加模块
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
cudabgsegm. Background Segmentation
cudacodec. Video Encoding/Decoding
cudafeatures2d. Feature Detection and Description
cudafilters. Image Filtering
cudaimgproc. Image Processing
cudalegacy. Legacy support
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
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
hdf. Hierarchical Data Format I/O routines
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
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.
xfeatures2d. Extra 2D Features Framework
ximgproc. Extended Image Processing
xobjdetect. Extended object detection
xphoto. Additional photo processing algorithms