Adding 1 to moments to avoid tests fails

pull/3678/head
kalistratovag 10 years ago committed by Maksim Shabunin
parent 1138a38dbe
commit 20156d1eeb
  1. 6
      modules/imgproc/perf/perf_moments.cpp

@ -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);
}

Loading…
Cancel
Save