[cairo] A better image comparison tool
Asko Kauppi
askok at dnainternet.net
Mon Sep 22 12:54:39 PDT 2008
The Imagemagick suite has tools for this.
$ man compare
compare - mathematically and visually annotate the difference
between an image and its reconstruction.
This, together with 'composite' tool can be used also for making
visual difference pictures, which are often handy for humans.
composite ok.png a.png -compose DIFFERENCE png:- | convert - -
contrast-stretch 0 diff.png
I don't mind if you make a better tool. ImageMagick is somehow too
bloated to really know the right switch.
-asko
Antoine Azar kirjoitti 22.9.2008 kello 21:53:
> Hey all,
>
> this is something we discussed during the Cairo Summit, and I wanted
> to take some feedback and ideas on the list before I start working
> on it.
>
> The idea is to have a better image comparison tool in the Cairo test
> suite instead of simply checking for any pixel discrepancy. Carl
> pointed out we currently have several reference image sets to
> compensate for differences across backends. Such a tool would
> ideally eliminate these multiple images as much as possible. Another
> advantage of such a tool would be some integration in the build/test
> bot machines Mozilla is setting up. If a given patch changes the
> results of a render in a (new) correct way, instead of seeing a
> broken test suite, we would see e.g. a 90% similarity score for the
> given test.
>
> I am considering a couple approaches. The first one I want to try
> out is a pretty simple square sum of differences or sum of absolute
> differences. There are more fancy algorithms like cross correlation
> and mutual information, which I'll probably try out too. We can
> then set custom thresholds for what should appear as "OK", "Warning"
> and "Error".
>
> Best,
> Antoine
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
More information about the cairo
mailing list