1.读取
Mat Img;
Img = imread("F:/vs/number_detection/Template/Img.jpg", CV_LOAD_IMAGE_COLOR);
2.保存
Mat Img;
imwrite("F:/vs/number_detection/Template/Img.jpg", Img);
3.读取像素值
【单通道】
Mat Img;
for (int i = 0; i < Img.rows; i++)
{
for (j = 0; j < Img.cols; j++)
{
double gray = (double)src.at<uchar>(i, j);
}
}