2
這是cv::Mat
訪問所有像素的正確方法:訪問所有像素CV ::墊
for(row = 0; row < mat.rows; ++row)
{
for (col = 0; col < mat.cols; ++col)
{
}
}
還是有類似於此公式公式法爲IplImage *
:
temp_ptr = &((uchar*)(img->imageData + (img->widthStep*pt.x)))[pt.y*3];
你知道'Mat'有一個公共領域稱爲'型data''uchar'? – Nawaz
@Nawaz - 是的,先生,我知道這一點,請幫助我,我在這裏掙扎了一下,我知道這是指向數據,但我如何循環像素,我可以得到與rgb值工作與數據但不循環。 –