opencv3.2加载图片

#include <opencv2/opencv.hpp>
#include <iostream>

using namespace cv;
using namespace std;

int main()
{
  Mat src = imread("D:\\images\\1.jpg");
  if (src.empty())
  {
    cout <<"could not load image.." << endl;
    return -1;
  }
  namedWindow("window1",CV_WINDOW_AUTOSIZE);
  imshow("window1",src);

  //system("pause");
  waitKey(0);
  return 0;
}

 

posted @ 2018-06-12 19:26  西北逍遥  阅读(202)  评论(0编辑  收藏  举报