Bug ? Post an issue and you can give this code as example
cv::Mat imgf(5, 5, CV_32FC3);
cv::randu(imgf, 0, 0);
cout << imgf << "\n";
cout << "******************************\n";
cv::Mat img(5, 5, CV_8UC3);
cv::randu(img, 0, 0);
cout << img << "\n";
cout << "******************************\n";
cv::randu(img, 0, 1);
cout << img << "\n";
cout << "******************************\n";
results :
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
******************************
[255, 255, 255, 81, 255, 255, 255, 94, 0, 0, 0, 0, 255, 255, 255;
82, 0, 0, 0, 0, 255, 255, 255, 62, 255, 255, 255, 96, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255;
255, 255, 26, 255, 255, 255, 12, 255, 255, 255, 6, 0, 0, 0, 0;
255, 255, 255, 71, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 255]
******************************
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
******************************
I think error is here
int idiff = ip[j][0] = cvFloor(b) - ip[j][1] - 1;
cvFloor(b) - ip[j][1] - 1
should be checked and when value is negative set to 0 or may be check param1 arg must be < param2arg
(https://github.com/opencv/opencv/blob...)