opencv配置

合集下载
相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。


配置属性
VC++目录,包含目录debug/release
D:\opencv\build\include;
D:\opencv\build\include\opencv;
D:\opencv\build\include\opencv2;
库目录
D:\opencv\build\x86\vc10\lib;

连接器/输入/附加依赖项debug
opencv_calib3d248d.lib
opencv_contrib248d.lib
opencv_core248d.lib
opencv_features2d248d.lib
opencv_flann248d.lib
opencv_gpu248d.lib
opencv_highgui248d.lib
opencv_imgproc248d.lib
opencv_legacy248d.lib
opencv_ml248d.lib
opencv_nonfree248d.lib
opencv_objdetect248d.lib
opencv_ocl248d.lib
opencv_photo248d.lib
opencv_stitching248d.lib
opencv_superres248d.lib
opencv_ts248d.lib
opencv_video248d.lib
opencv_videostab248d.lib


release项
opencv_calib3d248.lib
opencv_contrib248.lib
opencv_core248.lib
opencv_features2d248.lib
opencv_flann248.lib
opencv_gpu248.lib
opencv_highgui248.lib
opencv_imgproc248.lib
opencv_legacy248.lib
opencv_ml248.lib
opencv_nonfree248.lib
opencv_objdetect248.lib
opencv_ocl248.lib
opencv_photo248.lib
opencv_stitching248.lib
opencv_superres248.lib
opencv_ts248.lib
opencv_video248.lib
opencv_videostab248.lib


测试代码
#include "stdafx.h"
#include "highgui.h"

//所有的以新风格命名的函数都在 cv 命名空间中
//如果希望不要每次都输入 cv:: ,则可使用下面语句
//using namespace cv;

int _tmain(int argc, _TCHAR* argv[])
{

const char* imagename = "4.jpg";

cv::Mat img = cv::imread(imagename); // Matlab风格的 cvLoadImage 函数的另一种调用
if(img.empty())
{
fprintf(stderr, "Can not load image %s\n", imagename);
return -1;
}

if( !img.data ) // 检查是否正确载入图像
return -1;

cv::namedWindow("image", CV_WINDOW_AUTOSIZE); //创建窗口
cv::imshow("image", img); //显示图像

cv::waitKey();

return 0;
}

相关文档
最新文档