--------------opencv-----------------
计算机->属性->高级->环境变量:增加path:
E:\Program Files\opencv 2.4.6.0\opencv\build\x86\vc10\bin
项目(菜单项)->…属性->VC++目录->包含目录:
E:\Program Files\opencv 2.4.6.0\opencv\build\include
E:\Program Files\opencv 2.4.6.0\opencv\build\include\opencv
E:\Program Files\opencv 2.4.6.0\opencv\build\include\opencv2
项目(菜单项)->…属性->VC++目录->库目录:
E:\Program Files\opencv 2.4.6.0\opencv\build\x86\vc10\lib
opencv_contrib240d.lib
opencv_core240d.lib
opencv_features2d240d.lib
opencv_flann240d.lib
opencv_gpu240d.lib
opencv_highgui240d.lib
opencv_imgproc240d.lib
opencv_legacy240d.lib
opencv_ml240d.lib
opencv_objdetect240d.lib
opencv_ts240d.lib
opencv_video240d.lib
测试程序:
#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;
计算机->属性->高级->环境变量:增加path:
E:\Program Files\opencv 2.4.6.0\opencv\build\x86\vc10\bin
项目(菜单项)->…属性->VC++目录->包含目录:
E:\Program Files\opencv 2.4.6.0\opencv\build\include
E:\Program Files\opencv 2.4.6.0\opencv\build\include\opencv
E:\Program Files\opencv 2.4.6.0\opencv\build\include\opencv2
项目(菜单项)->…属性->VC++目录->库目录:
E:\Program Files\opencv 2.4.6.0\opencv\build\x86\vc10\lib
项目(菜单项)->…属性->连接器->输入->附加依赖项:
(注:240为版本号,根据需要修改)
opencv_calib3d240d.libopencv_contrib240d.lib
opencv_core240d.lib
opencv_features2d240d.lib
opencv_flann240d.lib
opencv_gpu240d.lib
opencv_highgui240d.lib
opencv_imgproc240d.lib
opencv_legacy240d.lib
opencv_ml240d.lib
opencv_objdetect240d.lib
opencv_ts240d.lib
opencv_video240d.lib
测试程序:
#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;