opencv取图片像素的方法

xiaoxiao2021-02-28  127

第一种:使用指针 image.ptr<uchar>(m)[n])

double d0 = ushort(depth.ptr<ushort>(m)[n]) ;

RGB:

double b0 = rgb.ptr<uchar>(m)[n * 3];

double g0 = rgb.ptr<uchar>(m)[n * 3 + 1];

double r0 = rgb.ptr<uchar>(m)[n * 3 + 2];

第二种:image.at

double d1 = depth.at<ushort>(y1, n);

转载请注明原文地址: https://www.6miu.com/read-34906.html

最新回复(0)