diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-12-30 20:36:11 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-12-30 20:36:11 +0000 |
| commit | aab799432bc91295227e82668839e98de54ec0d9 (patch) | |
| tree | 848f62e57b7d49e0ede51151fdb410c03ff7ac61 /test | |
| parent | a83b3d8cf8d17bb935e455e76f458f217b08a56a (diff) | |
Try comparing images using RMS error metric.
Diffstat (limited to 'test')
| -rw-r--r-- | test/test.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/test/test.cc b/test/test.cc index 0c2f324e0..41b845f85 100644 --- a/test/test.cc +++ b/test/test.cc @@ -236,11 +236,8 @@ check_image (boost::filesystem::path ref, boost::filesystem::path check) ref_image.read (ref.string ()); Magick::Image check_image; check_image.read (check.string ()); - BOOST_CHECK_MESSAGE ( - !ref_image.compare(check_image), - ref << " differs from " << check << " " - << ref_image.meanErrorPerPixel() << " " << ref_image.normalizedMaxError() << " " << ref_image.normalizedMeanError() - ); + double const dist = ref_image.compare(check_image, Magick::RootMeanSquaredErrorMetric); + BOOST_CHECK_MESSAGE (dist < 0.001, ref << " differs from " << check << " " << dist); } void |
