Perceptual Image Diff

Introduction

PerceptualDiff is an image comparison utility that makes use of a computational model of the human visual system to compare two images.

This software is released under the GNU General Public License.

Contributors

Hector Yee for initial code and perceptual metric

Scott Corley for PNG file reading

Tobias Sauerwein for Fedora Linux RPM

for Fedora Linux RPM Jeff Breidenbach for Debian Packaging

Chris Foster for admin and patching

Jim Tilander for converting the IO to FreeImage

Why? I can look at the images myself

So why would I use a program to tell me if two images are similar if I can tell the difference myself by eyeballing it?

Well the utility of this program really shines in the context of QA of rendering algorithms.

During regression testing of a renderer, hundreds of images are generated from an older version of the renderer and are compared

with a newer version of the renderer. This program drastically reduces the number of false positives (failures that are not actually failures)

caused by differences in random number generation, OS or machine architecture differences. Also, you do not

want a human looking at hundreds of images when you can get the computer to do it for you nightly on a cron job.





Theory

The relevant theory behind the image metric can be found in the following resources:

Download Source or Precompiled binaries

The source code and OSX, Windows binaries are available for download. Note: earlier builds were named pdiff but due to naming conflict newer builds are named ‘PerceptualDiff’

Build Instructions

This project makes use of the Cross Platform Make Utility , and the FreeImage library. You will also need Subversion to obtain the source.

1. Obtain the source from sourceforge: svn co https://pdiff.svn.sourceforge.net/svnroot/pdiff pdiff

2. Edit CMakeLists.txt as necessary to point to libtiff

3. Type cmake .

4. Type make .

5. PerceptualDiff should be compiled for your target system

Usage

PerceptualDiff image1.tif image2.tif [options]

-verbose : Turns on verbose mode

- fov : field of view,indicates how much of the observer's view the screen occupies, expressed in degrees; typically this is between 10 and 85. The front row of a theater has a field of view of around 85 degrees. The middle row has a field of view of around 50 degrees. The back row has a field of view of around 27 degrees. Pick a value that matches the strictness requirements of your test; for example, if it is important to fail on the slightest noticeable error, use -fov 85.

: field of view,indicates how much of the observer's view the screen occupies, expressed in degrees; typically this is between 10 and 85. The front row of a theater has a field of view of around 85 degrees. The middle row has a field of view of around 50 degrees. The back row has a field of view of around 27 degrees. Pick a value that matches the strictness requirements of your test; for example, if it is important to fail on the slightest noticeable error, use -fov 85. -threshold p : Sets the number of pixels, p, to reject. For example if p is 100, then the test fails if 100 or more pixels are perceptably different.

Sets the number of pixels, p, to reject. For example if p is 100, then the test fails if 100 or more pixels are different. -gamma g : The gamma to use to convert to RGB linear space. Default is 2.2

The gamma to use to convert to RGB linear space. Default is 2.2 -luminance l: The luminance of the display the observer is seeing. Default is 100 candela per meter squared

How to Contribute

Volunteer to write code fragments like image importers (currently we support tiff and png )

) Volunteer to build and release for Linux or other operating systems

Donate to the project

Acknowledgements