Is this the correct way of accessing all pixels in cv::Mat
:
for( row = 0; row < mat.rows; ++row)
{
for ( col = 0; col < mat.cols; ++col)
{
}
}
Or is there a formula method similar to this formula for an IplImage *
:
temp_ptr = &((uchar*)(img->imageData + (img->widthStep*pt.x)))[pt.y*3];