VS2013 + OpenCV-2.4.13
配置:
1、系统环境变量
D:\opencv\opencv\build\x86\vc12\bin 2、VC++ 目录 包含目录: D:\opencv\opencv\build\include 库目录: D:\opencv\opencv\build\x86\vc12\lib 3、连接器->输入->附加依赖项 Release opencv_calib3d2413.lib; opencv_contrib2413.lib; opencv_core2413.lib; opencv_features2d2413.lib; opencv_flann2413.lib; opencv_gpu2413.lib; opencv_highgui2413.lib; opencv_imgproc2413.lib; opencv_legacy2413.lib; opencv_ml2413.lib; opencv_nonfree2413.lib; opencv_objdetect2413.lib; opencv_ocl2413.lib; opencv_photo2413.lib; opencv_stitching2413.lib; opencv_superres2413.lib; opencv_ts2413.lib; opencv_video2413.lib; opencv_videostab2413.lib; Debug opencv_calib3d2413d.lib; opencv_contrib2413d.lib; opencv_core2413d.lib; opencv_features2d2413d.lib; opencv_flann2413d.lib; opencv_gpu2413d.lib; opencv_highgui2413d.lib; opencv_imgproc2413d.lib; opencv_legacy2413d.lib; opencv_ml2413d.lib; opencv_nonfree2413d.lib; opencv_objdetect2413d.lib; opencv_ocl2413d.lib; opencv_photo2413d.lib; opencv_stitching2413d.lib; opencv_superres2413d.lib; opencv_ts2413d.lib; opencv_video2413d.lib; opencv_videostab2413d.lib;测试:
#include#include using namespace std;using namespace cv;int main(int argc, char **argv){ Mat img = imread("lena.png"); if (img.empty()) { cout << "打开图像失败!" << endl; return -1; } namedWindow("image", CV_WINDOW_AUTOSIZE); imshow("image", img); waitKey(); return 0;}