Updated by Dmitry Retinskiy over 10 years ago

I am getting different values at the pixel level when using 2.4.9 vs 3.0.0

The values are different when looking at the image pixels via integers or when converted to a float / double.

<pre> @
Mat img;
Mat d_img;
img = imread("a_file.jpg");
img.convertTo(d_img, CV32FC3, 1.0 / 255.0);

for (int i = 0; i < d_img.rows; i++)
{
for (int j = 0; j < d_img.cols; j++)
{
//float or double same error
//also different values if I peek into the int version of the image.
double d_blue = d_img.at<Vec3cf>(i,j)[0];
double d_green = d_img.at<Vec3cf>(i,j)[1];
double d_red = d_img.at<Vec3cf>(i,j)[2];

cout << d_blue << " " << d_green << " " << d_red << endl;
}
}
</pre> @

Back