图像操作
一、读写图像
imread
imwrite
二、读写像素
-
读一个GRAY像素点的像素值(CV_8UC1)
-
Scalar intensity = img.at<uchar>(y,x)
-
Scarlar intensity = img.at<uchar>(Point(x,y))
-
读一个RGB像素点的像素值
Vec3f intensity = img.at<Vec3f>(y,x);
float blue = intensity.val[0];
float green = intensity.val[1];
float red = intensity.val[2];