Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图将 opencv c++ 代码传输到 python。但我不知道如何更改下面的这一行:
((uchar*)(img->imageData + img->widthStep*i))[j];
当我这样写时: (img.imageData + img.widthStep * i)[j]
它发生此错误消息:'cv2.cv.iplimage' 对象没有属性'imageData'
这很简单。
img[i, j]会给你一个(B, G, R)像素的元组i, j.
img[i, j]
(B, G, R)
i, j.