首页 > 代码库 > opencv 配置

opencv 配置

包含目录
$(OPENCV)\include\
$(OPENCV)\include\opencv\
$(OPENCV)\include\opencv2\
 
即:
D:\opencv\opencv\build\include\;D:\opencv\opencv\build\include\opencv\;D:\opencv\opencv\build\include\opencv2\
 
库目录
D:\opencv\opencv\build\x64\vc14\lib\
 
连接器输入
opencv_world310d.lib
 
注意:Debug调整成*64,默认是*86
 
测试代码:
#include <opencv2\opencv.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;
}

 

opencv 配置