Usually I do
unsigned char *input = (unsigned char*)(oOut.data);
for (int i = 0; i < oOut.rows; i++)
{
for (int j = 0; j < oOut.cols; j++)
{
input[oOut.step[0]*i + oOut.step[1]*j] = 255;
}
}
This is with a typical 8UC1 mat. Now, I want to store values that can range from -1500 to 1500. So I'm using a CV_32S mat. But I can figure out how to store values inside. I always end up with corruption with incoherent values.
Can someone help me?
Thanks Seb