What you need to call to the function opencv, it is referenced in the code head in advance corresponding header files.
All header files are in the include/opencv2/
folder to find the file.
Common header file:
#include "opencv2/core/core_c.h"
#include "opencv2/core/core.hpp"
#include "opencv2/flann/miniflann.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/photo/photo.hpp"
#include "opencv2/video/video.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/ml/ml.hpp"
#include "opencv2/highgui/highgui_c.h"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/contrib/contrib.hpp"
Specific action:
- core: it can be seen by name is the core module, defines the basic data structures and arithmetic functions;
- imgproc: The module consists of linear and nonlinear image filtering, image geometric transformations, color space conversion, histogram processing and the like;
- video: The module comprises a motion estimation, background separation, object tracking;
- highgui: Interface video capture, encoding and decoding of image and video, the graphical interface;
- calib3d: substantially multi-view geometry algorithm, the individual stereo camera calibration, the object pose estimation, stereo reconstruction algorithm similarity, 3D information;
- features2d: remarkable feature detection, description, feature matching;
- objdetect: object detection and classification of pre-defined instances (such as the face, eyes, face, people, vehicles, etc.);
- ml: machine learning module (SVM, decision trees, Boosting, etc.) ;;
- GPU: OpenCV module using the GPU acceleration algorithm;
- contrib: achieve a variety of target tracking algorithms, including featuretracker, hybridtracker and detection_based_tracker etc;
Among them, the most frequently cited header file:
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
Since opencv.hpp
already contains OpenCV header file of each module, you may only reference the header files:
#include <opencv2/opencv.hpp>
references
[. 1] the OpenCV overview
[2] the OpenCV Learning (3) OpenCV frame