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

Fixed cv::cuda::reduce bug.

This commit is contained in:
aravind
2016-02-26 15:44:20 +05:30
parent 81f21e6e6c
commit f4f1561781
5 changed files with 6 additions and 19 deletions
+1 -4
View File
@@ -877,14 +877,11 @@ CUDA_TEST_P(Reduce, Cols)
{
cv::Mat src = randomMat(size, type);
cv::cuda::GpuMat dst = createMat(cv::Size(src.rows, 1), dst_type, useRoi);
cv::cuda::GpuMat dst;
cv::cuda::reduce(loadMat(src, useRoi), dst, 1, reduceOp, dst_depth);
cv::Mat dst_gold;
cv::reduce(src, dst_gold, 1, reduceOp, dst_depth);
dst_gold.cols = dst_gold.rows;
dst_gold.rows = 1;
dst_gold.step = dst_gold.cols * dst_gold.elemSize();
EXPECT_MAT_NEAR(dst_gold, dst, dst_depth < CV_32F ? 0.0 : 0.02);
}