OpenCV图像读入

#include "stdafx.h"

#include

#include

int main()

{

Mat img = imread("E:/testimg/scaled-im07-jpg.png",1);//参数1表示原图

namedWindow("Original Image");

imshow("Original Image",img);

Mat imgGray = imread("E:/testimg/scaled-im07-jpg.png", 0);//参数1表示灰度图像

namedWindow("Gray Image");

imshow("Gray Image", imgGray);

waitKey();

}

你可能感兴趣的:(OpenCV图像读入)