#include "opencv2/imgproc/imgproc.hpp"
(ofc, you have to link opencv_imgproc, too)
#include "opencv2/opencv.hpp"convertro是opencv/core庫(kù)里面的如果報(bào)下面的錯(cuò):VideoTest.cpp:(.text+0x6f): undefined reference to `cv::VideoWriter::fourcc(char,char,char, char)'VideoTest.cpp:(.text+0xc3): undefined reference to `cv::VideoWriter::open(cv::String const&, int, double, cv::Size_, bool)'VideoTest.cpp:(.text+0x103): undefined reference to `cv::namedWindow(cv::String const&, int)'VideoTest.cpp:(.text+0x146): undefined reference to `cv::VideoCapture::read(cv::_OutputArray const&)'VideoTest.cpp:(.text+0x1b1): undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)'解決方法是:
#include "opencv2/videoio.hpp"also, you don't seem to link to any of the required opencv libs, those are:opencv_core, opencv_videoio, opencv_highgui
http://stackoverflow.com/questions/27146818/opencv-resize-is-not-a-member-of-cv-opencv-basics