标签:
环境说明:本文使用的环境是win10+vs2013+opencv2.4.9
在opcv的官网http://opencv.org/downloads.html上下载version 2.4.9版本的源码;
如下所示:
opencv_calib3d249d.lib
opencv_contrib249d.lib
opencv_core249d.lib
opencv_features2d249d.lib
opencv_flann249d.lib
opencv_gpu249d.lib
opencv_highgui249d.lib
opencv_imgproc249d.lib
opencv_legacy249d.lib
opencv_ml249d.lib
opencv_nonfree249d.lib
opencv_objdetect249d.lib
opencv_ocl249d.lib
opencv_photo249d.lib
opencv_stitching249d.lib
opencv_superres249d.lib
opencv_ts249d.lib
opencv_video249d.lib
opencv_videostab249d.lib
include <iostream>
include "opencv2/core/core.hpp"
include "opencv2/highgui/highgui.hpp"
using namespace cv;
int main()
{
// 读入一张图片
Mat img = imread("pic.png");
// 创建窗口
namedWindow("pic");
// 在窗口中显示图片
imshow("pic", img);
// 等待60000 ms后窗口自动关闭
waitKey(60000);
}
标签:
原文地址:http://blog.csdn.net/android_ruben/article/details/51259875