OpenCvSharp 得到Mat的像素点的值

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/djshichaoren/article/details/79843243
Vec3b value = image.At<Vec3b>(5, 100);

image是Mat类型,得到第5行,第100列的像素值。注意返回值的类型是Vec3b


Vec3b value = image.Get<Vec3b>(5, 100);

与At的功能相似,但是当返回灰度图的值时,At返回的三个值是相等的,Get返回的三个值不一定相等。

还是用At保险。

猜你喜欢

转载自blog.csdn.net/djshichaoren/article/details/79843243