Since version 2.2, the OpenCV library is divided into several modules. These modules are built in library fles located in the lib directory. They are:
??1 The opencv_core module that contains the core functionalities of the library, in particular, the basic data structures and arithmetic functions.
??2 The opencv_imgproc module that contains the main image processing functions.
??3 The opencv_highgui module that contains the image and video reading and writing functions, along with other user interface functions.
??4 The opencv_features2d module that contains the feature point detectors and descriptors and the feature point matching framework.
??5 The opencv_calib3d module that contains the camera calibration, two-view geometry estimation, and stereo functions.
? 6 The opencv_video module that contains the motion estimation, feature tracking, and foreground extraction functions and classes.
??7 The opencv_objdetect module containing the object detection functions such as the face and people detectors.
The library also includes other utility modules containing machine learning functions (opencv_ml), computational geometry algorithms (opencv_flann), contributed code (opencv_contrib), obsolete code (opencv_legacy), and GPU accelerated code (opencv_gpu).
All of these modules have a header fle associated with them (located in include directory).
Typical OpenCV C++ code will therefore start by including the required modules. For example
(and this is the suggested declaration style):
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
If you see OpenCV code starting with:
?#include "cv.h"
it is because it uses the old style, before the library was restructured into modules.
翻譯:
???opencv自從2.2版本起,將庫分成很多模塊,這些模塊編譯成庫,放在opencv的lib文件夾下。他們分別是:
1. opencv_core 模塊 它包含庫的核心函數(shù),實際上它包含基本的數(shù)據(jù)結(jié)構(gòu)和算術(shù)函數(shù)
2. opencv_imgproc 模塊 它包含主要的圖像處理函數(shù)
3. The opencv_highgui 模塊,它包含圖像和視頻的讀寫函數(shù)以及用戶交互函數(shù)
4. opencv_features2d 模塊,它包含特征點的檢測、描述以及匹配的框架
5. opencv_calib3d 模塊,它包含攝像頭的校準,雙目幾何估計和立體函數(shù)
6. opencv_video 模塊,它包含運動目標估計,特征跟蹤和前景提取的函數(shù)和類
7. opencv_objdetect 模塊,它包含目標檢測函數(shù)如人臉檢測,和行人檢測
opencv庫還包含其他單元模塊如機器學(xué)習(xí)模塊?(opencv_ml), 計算幾何算法模塊(opencv_flann), 已貢獻代碼模塊(opencv_contrib), 過時的代碼模塊opencv_legacy以及圖形加速模塊(opencv_gpu).
所有的模塊都有一個與之關(guān)聯(lián)的頭文件(在include路徑下)
典型的OPENCV c++代碼通常以包含這些必須的模塊開始,如:
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯(lián)系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
