cpp//方式一
Scalar intensity = img.at<uchar>(y, x);
//方式二
Scalar intensity = img.at<uchar>(Point(x, y));
cpp//读取整形
Vec3b intensity = src.at<Vec3b>(x, y);
int b = intensity [0];
int g = intensity [1];
int r = intensity [2];
//读取浮点型
Vec3f intensity = img.at<Vec3f>(y, x);
float blue = intensity.val[0];
float green = intensity.val[1];
float red = intensity.val[2];
src.convertTo(dst, CV_32F);
OpenCV是计算机视觉开源库,主要算法涉及图像处理和机器学习相关方法。是Intel公司贡献出来的,俄罗斯工程师贡献大部分C/C++代码。官网:https://opencv.org/ 从这里 https://opencv.org/releases.html 你可以下载到自己想要的版本!