Fixed imgcodecs tests
- Imgcodecs_Image, write_imageseq - assuming JPEG images have losses - Imgcodecs_Drawing, c_regression - replaced assert calls - Imgcodecs_Drawing - exact comparison with reference image
This commit is contained in:
@@ -147,10 +147,13 @@ public:
|
||||
CV_Assert(img.size() == img_test.size());
|
||||
CV_Assert(img.type() == img_test.type());
|
||||
|
||||
double n = cvtest::norm(img, img_test, NORM_L2);
|
||||
if ( n > 1.0)
|
||||
// JPEG format does not provide 100% accuracy
|
||||
// using fuzzy image comparison
|
||||
double n = cvtest::norm(img, img_test, NORM_L1);
|
||||
double expected = 0.05 * img.size().area();
|
||||
if ( n > expected)
|
||||
{
|
||||
ts->printf(ts->LOG, "norm = %f \n", n);
|
||||
ts->printf(ts->LOG, "norm = %f > expected = %f \n", n, expected);
|
||||
ts->set_failed_test_info(ts->FAIL_MISMATCH);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user