I'm unable to access the values in the matrix properly.
for (int i = 0; i < image.rows; i++)
{
for (int j = 0; j < image.cols; j++)
{
img[j + image.cols*i + image.cols*image.rows * 0] = image.at(i, j)[0];
img[j + image.cols*i + image.cols*image.rows * 1] = image.at(i, j)[1];
img[j + image.cols*i + image.cols*image.rows * 2] = image.at(i, j)[2];
}
}
↧