mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
gapi(test): ban and get rid of countNonZero() checks
This commit is contained in:
committed by
Alexander Alekhin
parent
102ef39a27
commit
f2d3edec80
@@ -45,7 +45,7 @@ TEST_P(PartialComputation, Test)
|
||||
if (roi == cv::Rect{}) roi = cv::Rect{0,0,sz.width,sz.height};
|
||||
cv::blur(in_mat(roi), out_mat_ocv(roi), {kernelSize, kernelSize}, anchor, borderType);
|
||||
|
||||
EXPECT_EQ(0, cv::countNonZero(out_mat_gapi != out_mat_ocv));
|
||||
EXPECT_EQ(0, cvtest::norm(out_mat_gapi, out_mat_ocv, NORM_INF));
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(Fluid, PartialComputation,
|
||||
@@ -79,7 +79,7 @@ TEST_P(PartialComputationAddC, Test)
|
||||
if (roi == cv::Rect{}) roi = cv::Rect{0,0,sz.width,sz.height};
|
||||
out_mat_ocv(roi) = in_mat(roi) + 1;
|
||||
|
||||
EXPECT_EQ(0, cv::countNonZero(out_mat_gapi != out_mat_ocv));
|
||||
EXPECT_EQ(0, cvtest::norm(out_mat_gapi, out_mat_ocv, NORM_INF));
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(FluidRoi, PartialComputationAddC,
|
||||
@@ -125,7 +125,7 @@ TEST_P(SequenceOfBlursRoiTest, Test)
|
||||
|
||||
cv::blur(mid_mat_ocv(roi), out_mat_ocv(roi), {5,5}, anchor, borderType);
|
||||
|
||||
EXPECT_EQ(0, countNonZero(out_mat_ocv != out_mat_gapi));
|
||||
EXPECT_EQ(0, cvtest::norm(out_mat_ocv, out_mat_gapi, NORM_INF));
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(FluidRoi, SequenceOfBlursRoiTest,
|
||||
@@ -180,8 +180,8 @@ TEST_P(TwoBlursRoiTest, Test)
|
||||
cv::blur(in_mat(outRoi), out_mat_ocv1(outRoi), {kernelSize1, kernelSize1}, anchor, borderType1);
|
||||
cv::blur(in_mat(outRoi), out_mat_ocv2(outRoi), {kernelSize2, kernelSize2}, anchor, borderType2);
|
||||
|
||||
EXPECT_EQ(0, countNonZero(out_mat_ocv1 != out_mat_gapi1));
|
||||
EXPECT_EQ(0, countNonZero(out_mat_ocv2 != out_mat_gapi2));
|
||||
EXPECT_EQ(0, cvtest::norm(out_mat_ocv1, out_mat_gapi1, NORM_INF));
|
||||
EXPECT_EQ(0, cvtest::norm(out_mat_ocv2, out_mat_gapi2, NORM_INF));
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(FluidRoi, TwoBlursRoiTest,
|
||||
|
||||
Reference in New Issue
Block a user