Perceptual Differences Between Images

0
546

Perceptual Image Diff is a small command-line utility used to establish perceptual comparisons between two images. Unlike metrics based on pixel-by-pixel comparisons such as PSNR (Peak Signal to Noise Ratio) or RMSE (Root Mean-Square Error), perceptual metrics operate on the entire image at the level of contrast, color, brightness, structures, etc., offering a result closer to human perception.

Perceptual Image Diff was released in 2006 based on the prior work of Y. Hector Yee in developing a new perceptual metric through his thesis at Cornell University in 2000. His work and advice were used by DreamWorks in the render quality control for Shrek 2 in 2004. This type of tools and metrics are very interesting for evaluating the behavior of compression algorithms, color profiles, etc.

The tool itself is written in C, with precompiled cross-platform support for each OS. The command-line options are very few and simple, offering the possibility to discriminate chroma or luminance, as well as extract a difference map:

Compares image1.tif and image2.tif using a perceptually based image metric
 Options:
 -verbose       : Turns on verbose mode
 -fov deg       : Field of view in degrees (0.1 to 89.9)
 -threshold p     : #pixels p below which differences are ignored
 -gamma g       : Value to convert rgb into linear space (default 2.2)
 -luminance l   : White luminance (default 100.0 cdm^-2)
 -luminanceonly : Only consider luminance; ignore chroma (color) in the comparison
 -colorfactor   : How much of color to use, 0.0 to 1.0, 0.0 = ignore color.
 -downsample    : How many powers of two to down sample the image.
 -output o.ppm  : Write difference to the file o.ppm

The tool has a GUI or interface to make the work friendlier, although it is only available for Windows, so I have not had the opportunity to try it.