opencv中包含的头文件有:
#ifndef __OPENCV_ALL_HPP__
#define __OPENCV_ALL_HPP__#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"
#endif
如果不知道对应的是opencv的哪个头文件,就直接#include<opencv2/opencv.hpp>把所有的头文件都包含进来
Mat对应的头文件为#include "opencv2/highgui/highgui.hpp"