1 | initial version |
You have to change the line:
uint8_t* p = y_channel.data;
to:
float * p = (float*)y_channel.data;
2 | No.2 Revision |
You have to change the line:
uint8_t* p = y_channel.data;
to:
float * p = (float*)y_channel.data;
and no need to use saturate_cast<>, just do like this:
std::cout << p[i*y_channel.cols + j] << std::endl;