1. 程式人生 > >《OpenCV3程式設計入門》——“opencv.hpp” 標頭檔案認知

《OpenCV3程式設計入門》——“opencv.hpp” 標頭檔案認知

# include <opencv2/opencv.hpp>標頭檔案定義類似如下:

# include <opencv2/opencv.hpp>

# 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/m1/m1.hpp"

# include "opencv2/highgui/highgui_c.h"

# include "opencv2/highgui/highgui.hpp"

# include "opencv2/contrib/contrib.hpp"

# endif

opencv.hpp已經包含了OpenCV各模組的標頭檔案,所以在編寫core、objdetect、imgproc、photo、features2d、calib3d、m1、highgui、contrib模組的應用程式時,原則上僅寫一句“# include <opencv2/opencv.hpp>”即可。