1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Restore core multiply/divide depth to CV_64F value.

After setting depth to CV_32F for non double types this produces difference in results. I've attached test that reproduce this issue.The issue was found during anali broken GPU tests  for multiply/device functions.
This commit is contained in:
marina.kolpakova
2012-10-21 11:20:39 +04:00
parent b6a2717c2b
commit 99c666691e
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -1522,4 +1522,12 @@ protected:
TEST(Core_ArithmMask, uninitialized) { CV_ArithmMaskTest test; test.safe_run(); }
TEST(Multiply, FloatingPointRounding)
{
cv::Mat src(1, 1, CV_8UC1, cv::Scalar::all(110)), dst;
cv::Scalar s(147.286359696927, 1, 1 ,1);
cv::multiply(src, s, dst, 1, CV_16U);
// with CV_32F this produce result 16202
ASSERT_EQ(dst.at<ushort>(0,0), 16201);
}