[cairo] A better image comparison tool

Adib Taraben taraben.a at st-innovation.com
Wed Sep 24 00:51:10 PDT 2008


Hello Antoine,

in the Inkscape team we had a GSOC project that set-up some rendering 
tests. Currently there is only binary compare of the images (sounds 
familiar ?)
There is also a tool for perceptual image difference 
http://pdiff.sourceforge.net/

I think/assume that this tool detects only "visible" differences using 
hard stuff mathematics ;-) You might look at this tool too.

1.) perceptualdiff does not handle transparency in images.
2.) Also what I need is to define some exclude and/or include regions.
     - Some test images have text that I would not like to take into 
consideration.
     - Or I would like to specifically point to that line-caps only.

Those are my 2ct :-)

HTH,

Adib.
---


Antoine Azar wrote:
> 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