Commit 20156d1e authored by kalistratovag's avatar kalistratovag Committed by Maksim Shabunin

Adding 1 to moments to avoid tests fails

parent 1138a38d
......@@ -34,5 +34,11 @@ PERF_TEST_P(MomentsFixture_val, Moments1,
TEST_CYCLE() m = cv::moments(src, binaryImage);
int len = (int)sizeof(cv::Moments) / sizeof(double);
cv::Mat mat(1, len, CV_64F, (void*)&m);
//adding 1 to moments to avoid accidental tests fail on values close to 0
mat += 1;
SANITY_CHECK_MOMENTS(m, 1e-4, ERROR_RELATIVE);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment