#include "stdafx.h"
#include <iostream>
#include <opencv2/opencv.hpp>
int main()
{
Mat img = imread("E:/testimg/scaled-im07-jpg.png",1);//參數(shù)1表示原圖
namedWindow("Original Image");
imshow("Original Image",img);
Mat imgGray = imread("E:/testimg/scaled-im07-jpg.png", 0);//參數(shù)1表示灰度圖像
namedWindow("Gray Image");
imshow("Gray Image", imgGray);
waitKey();
}