包含目录
$(OPENCV)include
$(OPENCV)includeopencv
$(OPENCV)includeopencv2
即:
D:opencvopencvuildinclude;D:opencvopencvuildincludeopencv;D:opencvopencvuildincludeopencv2
库目录
D:opencvopencvuildx64vc14lib
连接器输入
opencv_world310d.lib
注意:Debug调整成*64,默认是*86
测试代码:
#include <opencv2opencv.hpp> #include <iostream> #include <string> using namespace cv; using namespace std; int main() { Mat img = imread("pp.jpg"); if(img.empty()) { cout<<"error"; return -1; } imshow("xx的靓照",img); waitKey(); return 0; }