OpenCV 基礎(chǔ)功能簡介
OpenCV(開源計(jì)算機(jī)視覺庫 http://opencv.org ) 是一個(gè)開源的BSD許可庫,包含數(shù)百種計(jì)算機(jī)視覺算法。由于功能強(qiáng)大,幾乎所有用到的復(fù)雜的圖片分析處理都會(huì)用到,所以有必要了解下它具體都有什么功能,方便我們使用。
官方文檔: OpenCV 教程 — OpenCV 2.3.2 documentation http://www.opencv.org.cn/opencvdoc/2.3.2/html/doc/tutorials/tutorials.html
OpenCV的應(yīng)用領(lǐng)域:
人機(jī)互動(dòng)
物體識別
圖像分割
人臉識別
動(dòng)作識別
運(yùn)動(dòng)跟蹤
機(jī)器人
運(yùn)動(dòng)分析
機(jī)器視覺
結(jié)構(gòu)分析
汽車安全駕駛
OpenCV主要功能
1、Core functionality
Core functionality:基礎(chǔ)數(shù)據(jù)模塊,包含一些發(fā)雜數(shù)據(jù)結(jié)構(gòu)和基本函數(shù)方法,主要包含如下的內(nèi)容:
OpenCV基本數(shù)據(jù)結(jié)構(gòu)(Basic Structures);
基本的C語言數(shù)據(jù)結(jié)構(gòu)和操作(Basic C Structures and Operations);
動(dòng)態(tài)數(shù)據(jù)結(jié)構(gòu)(Dynamic Structures);
數(shù)組操作相關(guān)函數(shù)(Operations on Arrays);
繪圖功能(Drawing Functions);
XML和YAML語法的支持(XML/YAML Persistence);
XML和YAML語法的支持的C語言接口(XML/YAML Persistence (C API));
聚類(Clustering);
輔助功能與系統(tǒng)函數(shù)和宏(Utility and System Functions and Macros);
與OpenGL的互操作(OpenGL interoperability);
2、Image processing
Image processing :圖像處理模塊,包括線性和非線性圖像濾波,幾何圖像變換(調(diào)整大小,仿射和透視扭曲,基于通用表的重新映射),顏色空間轉(zhuǎn)換,直方圖等。imgproc,是Image Processing的簡寫。圖像處理模塊,主要包含以下內(nèi)容:
線性和非線性的圖像濾波(Image Filtering);
圖像的幾何變換(Geometric Image Transformations);
圖像的其他變換(Miscellaneous Image Transformations);
直方圖(Histograms);
結(jié)構(gòu)分析和形狀描述(Structural Analysis and Shape Descriptors);
運(yùn)動(dòng)分析和目標(biāo)跟蹤(Motion Analysis and Object Tracking);
特征檢測(Feature Detection);
目標(biāo)檢測(Object Detection);
3、highgui
是High-level GUI and Media I/O的簡寫。高層用戶界面模塊和媒體輸入/輸出模塊,主要包含以下內(nèi)容:
用戶界面(User Interface);
圖片和視頻的讀寫(Reading and Writing Images and Video);
QT新功能(Qt New Functions);
4、features2d
2D Features Framework的簡寫。二維特征框架模塊,主要包含以下內(nèi)容:
人臉識別
VR和AR
特征的檢測和描述(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);
關(guān)鍵點(diǎn)和匹配結(jié)果的繪制功能(Drawing Function of Keypoints and Matches);
目標(biāo)分類(Object Categorization);
5、flann
Clustering and Search in Multi-Dimensional Spaces,多維空間聚類和搜索模塊,主要包含以下內(nèi)容:
快速近視最近鄰搜索(Fast Approximate Nearest Neighbor Search);
聚類(Clustering);
6、video
是Video Analysis的簡寫。視頻分析模塊,主要包含以下內(nèi)容:
運(yùn)動(dòng)分析和目標(biāo)跟蹤(Motion Analysis and Object Tracking),視頻相關(guān)的,上面提到的是圖片相關(guān)的;
7、calib3d
是Camera Calibration and 3D Reconstruction的簡寫。這個(gè)模塊主要是相機(jī)校準(zhǔn)和三維重建相關(guān)的內(nèi)容,包括基本的多視角幾何算法、單個(gè)立體攝像頭標(biāo)定、物體姿態(tài)估計(jì)、立體相似性算法,3D信息的重建等
8、ml
機(jī)器學(xué)習(xí)庫:統(tǒng)計(jì)模型、隨機(jī)樹、神經(jīng)網(wǎng)絡(luò)等等…
9、objdetect
檢測預(yù)定義類的對象和實(shí)例(例如,面部,眼睛,馬克杯,人,汽車等)。
10、video
視頻分析模塊,包括運(yùn)動(dòng)估計(jì),背景減法和對象跟蹤算法。
11、photo
圖像修復(fù)和圖像去噪兩部分