我有一个 x,y 点坐标,我如何使用它来访问 IplImage 上的特定点?
谢谢
最佳答案
CV_IMAGE_ELEM( image_header, elemtype, y, x*N+C )
例如给定一个 8 位 3 channel (例如 RGB)IplImage* img
,我们希望在第二个 channel 上使用 (x,y)
:
CV_IMAGE_ELEM(img, uchar, y, (x * 3) + 1))
关于image - 如何访问 OpenCV 中的像素?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7535364/