#include<opencv2\opencv.hpp>
#include<opencv2\core.hpp>
#include<iostream>
#include <cstdio>
#include <string>
#include <sstream>
using namespace cv;
using namespace std;
void main(){
Mat picture = imread("C:\\Users\\hasee\\Desktop\\cat2.jpg");
Mat gray=imread("C:\\Users\\hasee\\Desktop\\cat2.jpg",0);imwrite("grayCat.jpg",gray);
int myRow = picture.cols - 1;
int myCol = picture.rows - 1;
// Vec3b pixel = picture.at<Vec3b>(myRow,myCol);
// cout << "BGR:" << (int)pixel[0] << "," << (int)pixel[1] << "," << (int)pixel[2] << endl;
imshow("测试程序", picture);
imshow("灰度图像",gray);
waitKey(0);
}