您的位置:首页 > 运维架构

OpenCV 基本模块

2016-03-31 14:56 375 查看

简介

OpenCV
的全称是:
Open Source Computer Vision Library
OpenCV
是一个基于
BSD
许可(开源)发行的跨平台计算机视觉库,可以运行在
Linux
Windows
Mac OS
操作系统上。它轻量级而且高效——由一系列
C
函数和少量
C++
类构成,同时提供了
Python
Ruby
MATLAB
等语言的接口,实现了图像处理和计算机视觉方面的很多通用算法。

所有新的开发和算法都是用
C++
接口。一个使用
CUDA
GPU
接口也于2010年9月开始实现。

官方主页:http://opencv.org/

官方文档:http://docs.opencv.org/2.4/modules/refman.html

文件结构

在调用
opencv
时需要用到的头文件分布(默认安装情况下,同时下面都是基于2.4.x版本):

windows
系统来说,一般在
OPENCV_DIR/build/include/
文件夹下,所以在VS中调用时需要配置附加库目录;

ubuntu
系统来说,一般在
/usr/local/include/
文件夹下,系统目录下,系统可以自动识别;

include
一般包含两个文件夹:

opencv
文件夹下面的内容是
OpenCV1.0
保留下来的头文件,现在很少使用了,所以在这里不关注;

opencv2
文件夹下是以后主要用到的功能模块;

opencv2
文件夹下面的结构如下图:



下面来单独介绍每个模块的功能(主要参考《OpenCV3编程入门》这本书,下面有下载链接,有兴趣的可以查看一下):

常用模块

core
,核心功能模块,主要包含如下的内容:

OpenCV
基本数据结构(
Basic Structures
);

基本的
C
语言数据结构和操作(
Basic C Structures and Operations
);

动态数据结构(
Dynamic Structures
);

数组操作相关函数(
Operations on Arrays
);

绘图功能(
Drawing Functions
);

XML
YAML
语法的支持(
XML/YAML Persistence
);

XML
YAML
语法的支持的
C
语言接口(
XML/YAML Persistence (C API)
);

聚类(
Clustering
);

辅助功能与系统函数和宏(
Utility and System Functions and Macros
);

OpenGL
的互操作(
OpenGL interoperability
);

imgproc
,是
Image Processing
的简写。图像处理模块,主要包含以下内容:

线性和非线性的图像滤波(
Image Filtering
);

图像的几何变换(
Geometric Image Transformations
);

图像的其他变换(
Miscellaneous Image Transformations
);

直方图(
Histograms
);

结构分析和形状描述(
Structural Analysis and Shape Descriptors
);

运动分析和目标跟踪(
Motion Analysis and Object Tracking
);

特征检测(
Feature Detection
);

目标检测(
Object Detection
);

highgui
,是
High-level GUI and Media I/O
的简写。高层用户界面模块和媒体输入/输出模块,主要包含以下内容:

用户界面(
User Interface
);

图片和视频的读写(
Reading and Writing Images and Video
);

QT新功能(
Qt New Functions
);

features2d
,是
2D Features Framework
的简写。二维特征框架模块,主要包含以下内容:

特征的检测和描述(
Feature Detection and Description
);

特征检测器的通用接口(
Common Interfaces of Feature Detectors
);

描述符提取器的通用接口(
Common Interfaces of Descriptor Extractors
);

描述符匹配器的通用接口(
Common Interfaces of Descriptor Matchers
);

通用描述符匹配器通用接口(
Common Interfaces of Generic Descriptor Matchers
);

关键点和匹配结果的绘制功能(
Drawing Function of Keypoints and Matches
);

目标分类(
Object Categorization
);

flann
Clustering and Search in Multi-Dimensional Spaces
,多维空间聚类和搜索模块,主要包含以下内容:

快速近视最近邻搜索(
Fast Approximate Nearest Neighbor Search
);

聚类(
Clustering
);

video
,是
Video Analysis
的简写。视频分析模块,主要包含以下内容:

运动分析和目标跟踪(
Motion Analysis and Object Tracking
),视频相关的,上面提到的是图片相关的;

calib3d
,是
Camera Calibration and 3D Reconstruction
的简写。这个模块主要是相机校准和三维重建相关的内容,包括基本的多视角几何算法、单个立体摄像头标定、物体姿态估计、立体相似性算法,3D信息的重建等。

加速模块

gpu
,是
GPU-accelerated Computer Vision
的简写,利用
GPU
加速的视觉模块,主要包含以下内容:

GPU
模块介绍(
GPU Module Introduction
);

初始化和信息(
Initalization and Information
);

数据结构(
Data Structures
);

矩阵操作(
Operations on Matrices
);

逐个元素操作(
Per-element Operations
);

图像处理(
Image Processing
);

矩阵降维(
Matrix Reductions
);

目标检测(
Object Detection
);

特征检测和描述(
Feature Detection and Description
);

图像滤波(
Image Filtering
);

相机标定和三维重建(
Camera Calibration and 3D Reconstruction
);

视频分析(
Video Analysis
);

ocl
,是
OpenCL-accelerated Computer Vision
的简写,运用OpenCL加速的视觉模块,主要包含以下内容:

OpenCL
模块介绍(
OpenCL Module Introduction
);

数据结构和公用功能(
Data Structures and Utility Functions
);

数据结构(
Data Structures
);

矩阵操作(
Operations on Matrics
);

矩阵降维(
Matrix Reductions
);

图像滤波(
Image Filtering
);

图像处理(
Image Processing
);

机器学习(
ml.Machine Learning
);

目标检测(
Object Detection
);

特征检测和描述(
Feature Detection And Description
);

视频分析(
Video Analysis
);

相机标定和三维重建(
Camera Calibration and 3D Reconstruction
);

其他模块

contrib
,是
Contributed/Experimental Stuff
的简写。该模块包含了一些最近添加的不太稳定的可选的功能,一般用不着,不用太关注。主要包含如下的内容:

立体匹配(
Stereo Correspondence
);

人脸识别模型(
FaceRecognizer Documentation
);

视网膜模型(
Retina Documentation
);

开源的快速外貌的映射算法(
OpenFABMAP
Fast Appearance-based Mapping algorithm
);

objdetect
,是
Object Detection
的简写。目标检测模块,主要包含以下内容:

级联分类(
Cascade Classification
);

SVM分类模型(
Latent SVM
);

ml
,是
Machine Learning
简写。机器学习模块,主要包含以下内容:

统计模型(
Statistical Models
);

一般贝叶斯分类器(
Normal Bayes Classifier
);

K-近邻(
K-Nearest Neighbors
);

支持向量机(
Support Vector Machines
);

决策树(
Decision Trees
);

提升(
Boosting
);

梯度提高树(
Gradient Boosted Trees
);

随机数(
Random Trees
);

超随机树(
Extremely randomized trees
);

期望最大化(
Expectation Maximization
);

神经网络(
Neural Networks
);

机器学习数据(
MLData
);

photo
Computational Photography
,计算摄影模块,主要包含以下内容:

修复(
Inpainting
);

去噪(
Denoising
);

stitching
Images stitching
,图像拼接模块,主要包含以下内容:

拼接流水线(
Stitching Pipeline
);

参考文献(
References
);

高层功能,拼接器(
High Level Functionality
);

相机(
Camera
);

特征寻找和图像匹配(
Features Finding and Images Matching
);

旋转估计(
Rotation Estimation
);

自动校准(
Autocalibration
);

图像扭曲(
Images Warping
);

接缝估计(
Seam Estimation
);

曝光补偿(
Exposure Compensation
);

图形混合(
Image Blenders
);

nonfree
Non-free functionality
,不免费的功能,一些具有专利的算法模块,主要包含以下内容:

特征提取和描述(
Feature Detection and Description
);

legacy
Deprecated stuff
,一些废弃的代码模块,留下了为了向下兼容,主要包含以下内容:

运动分析(
Motion Analysis
);

期望最大值(
Expectation Maximization
);

直方图(
Histograms
);

平面细分
C
语言接口(
Planar Subdivisions (C API)
);

特征提取和描述(
Feature Detection and Description
);

描述符提取器的通用接口(
Common Interfaces of Descriptor Extractors
);

通用描述符的通用接口(
Common Interfaces of Generic Descriptor Matchers
);

superres
,是
Super Resolution
的简写,超分辨率技术模块,主要包含以下内容:

超分辨率(
Super Resolution
);

viz
,是
3D Visualizer
的简写,三维可视化工具模块,主要包含以下内容:

可视化(
Viz
);

组件(
Widget
);

参考资料

ubuntu上安装使用opencv请参考:/article/7683206.html

参考书链接:http://download.csdn.net/detail/honyniu/9474159 (最新的关于OpenCV3的书)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: