System information (version)
- OpenCV => 3.3.0
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015
Detailed description
Mat m1(1, 1, CV_32FC1);
m1.at<float>(0) = 1.f;
const float a = 0.1f;
cout << (Mat)(m1.mul((a / m1))) << endl;
cout << (Mat)(m1.mul((Mat)(a / m1))) << endl;
Both expressions m1.mul((a / m1)) and m1.mul((Mat)(a / m1)) are expected to give the same result (0.1), but only the second one works. the first gives 10.
Steps to reproduce
System information (version)
Detailed description
Both expressions
m1.mul((a / m1))andm1.mul((Mat)(a / m1))are expected to give the same result (0.1), but only the second one works. the first gives 10.Steps to reproduce