码迷,mamicode.com
首页 > Windows程序 > 详细

win7 x64+vs2010 x64debug+openCV2.4.10

时间:2014-10-25 18:42:59      阅读:324      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   io   os   sp   文件   div   

下载安装程序,我把其解压在E:\opencv,这里解压到自己建立的文件夹opencv下是多此一举。

添加值

E:\opencv\opencv\build\x86\vc10\bin;E:\opencv\opencv\build\x86\vc10\lib(这个不加貌似也可以);E:\opencv\opencv\build\x64\vc10\bin

到环境变量path中。

注销或者重启系统使环境变量生效。

新建一个空的64bit控制台项目添加:

bubuko.com,布布扣

bubuko.com,布布扣

bubuko.com,布布扣

在E:\opencv\opencv\build\x64\vc10\lib目录下建立一个批处理:

dir *.lib /b > file_name.txt

然后打开file_name.txt

opencv_calib3d2410.lib
opencv_calib3d2410d.lib
opencv_contrib2410.lib
opencv_contrib2410d.lib
opencv_core2410.lib
opencv_core2410d.lib
opencv_features2d2410.lib
opencv_features2d2410d.lib
opencv_flann2410.lib
opencv_flann2410d.lib
opencv_gpu2410.lib
opencv_gpu2410d.lib
opencv_highgui2410.lib
opencv_highgui2410d.lib
opencv_imgproc2410.lib
opencv_imgproc2410d.lib
opencv_legacy2410.lib
opencv_legacy2410d.lib
opencv_ml2410.lib
opencv_ml2410d.lib
opencv_nonfree2410.lib
opencv_nonfree2410d.lib
opencv_objdetect2410.lib
opencv_objdetect2410d.lib
opencv_ocl2410.lib
opencv_ocl2410d.lib
opencv_photo2410.lib
opencv_photo2410d.lib
opencv_stitching2410.lib
opencv_stitching2410d.lib
opencv_superres2410.lib
opencv_superres2410d.lib
opencv_ts2410.lib
opencv_ts2410d.lib
opencv_video2410.lib
opencv_video2410d.lib
opencv_videostab2410.lib
opencv_videostab2410d.lib

提取出来lib文件末尾是d(debug)的。

测试代码:

#include <opencv2\opencv.hpp>
#include <iostream>
#include <string>
using namespace cv;
using namespace std;
int main()
{
    Mat img = imread("123.jpg");
    if(img.empty())
    {
        cout<<"error";
        return -1;
    }
    imshow("eye",img);
    waitKey();

    return 0;
}

 

win7 x64+vs2010 x64debug+openCV2.4.10

标签:style   blog   http   color   io   os   sp   文件   div   

原文地址:http://www.cnblogs.com/qiangua/p/4050466.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!