opencv访问某一坐标的像素不正确(踩坑)
今天做项目时,需要去访问一张二值图某一坐标点的问题,和往常一样是使用int tmp = Mat.at(i, j);
但是!经过对比,竟然拿到的像素是错的(经过ps对比之后)
经过多次查找资料
竟然!
官网给出了说明(官网)
In order to get pixel intensity value, you have to know the type of an image and the number of channels. Here is an example for a single channel
原创
2021-12-01 15:44:55 ·
2818 阅读 ·
0 评论