projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a83b3d8
)
Try comparing images using RMS error metric.
author
Carl Hetherington
<cth@carlh.net>
Sat, 30 Dec 2017 20:36:11 +0000
(20:36 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Sat, 30 Dec 2017 20:36:11 +0000
(20:36 +0000)
test/test.cc
patch
|
blob
|
history
diff --git
a/test/test.cc
b/test/test.cc
index 0c2f324e05de99126375bba104bd508cb23091d9..41b845f85626c38859f45c3bbeb0af554575b3e3 100644
(file)
--- 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 ());
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
}
void