#include "stdafx.h"
#include <iostream>
#include <opencv2/opencv.hpp>
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();
}