Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A fork of the perceptualdiff image comparison tool (pdiff.sourceforge.net) with OpenMP support

branch: master
Octocat-spinner-32 test Format March 09, 2014
Octocat-spinner-32 .clang-format Allow more whitespace November 24, 2013
Octocat-spinner-32 .gitignore Changed cmake to find freeimage automatically February 06, 2012
Octocat-spinner-32 .syntastic_cpp_config Enable OpenMP January 10, 2014
Octocat-spinner-32 .travis.yml Exclude line incorrectly missed by gcov March 09, 2014
Octocat-spinner-32 CMakeLists.txt Make optimization an option March 09, 2014
Octocat-spinner-32 CompareArgs.cpp Format March 29, 2014
Octocat-spinner-32 CompareArgs.h Update copyright dates March 09, 2014
Octocat-spinner-32 FindFreeImage.cmake Changed cmake to find freeimage automatically February 06, 2012
Octocat-spinner-32 LICENSE Move to the correct place November 24, 2013
Octocat-spinner-32 LPyramid.cpp Make parameters in definitions const March 16, 2014
Octocat-spinner-32 LPyramid.h Update copyright dates March 09, 2014
Octocat-spinner-32 Metric.cpp Exclude line incorrectly missed by gcov March 09, 2014
Octocat-spinner-32 Metric.h Update copyright dates March 09, 2014
Octocat-spinner-32 PerceptualDiff.cpp Update copyright dates March 09, 2014
Octocat-spinner-32 README.rst Try removing SVG workaround in readme April 17, 2014
Octocat-spinner-32 RGBAImage.cpp Update copyright dates March 09, 2014
Octocat-spinner-32 RGBAImage.h Remove unnecessary void March 16, 2014
Octocat-spinner-32 coverage.bash Move common code to "coverage.bash" April 19, 2013
Octocat-spinner-32 coveralls.bash Use "--no-gcov" November 09, 2013
Octocat-spinner-32 coverity.bash Clean beforehand March 08, 2014
Octocat-spinner-32 cppcheck.bash Fix shellcheck warnings January 24, 2014
Octocat-spinner-32 lcov.bash Move common code to "coverage.bash" April 19, 2013
Octocat-spinner-32 memcheck.bash Track origins of memory errors March 09, 2014
Octocat-spinner-32 memcheck.supp Suppress false positive from FreeImage March 09, 2014
README.rst

perceptualdiff

A program that compares two images using a perceptually based image metric.

Build status Static analysis status

Copyright (C) 2006-2011 Yangli Hector Yee

Copyright (C) 2011-2014 Steven Myint

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details in the file gpl.txt.

Build Instructions

  1. Download cross platform make from http://www.cmake.org
  2. Download freeimage from https://sourceforge.net/projects/freeimage (mac: port install freeimage or brew install freeimage, ubuntu: apt-get install libfreeimage-dev)
  3. Type cmake .
  4. Type make
  5. To specify the install directory, use make install DESTDIR="/home/me/mydist"

Usage

Command line:

perceptualdiff image1.(tif | png) image2.(tif | png) [options]
--verbose : Turns on verbose mode
--fov deg : Field of view, deg, in degrees. Usually between 10.0 to 85.0.
            This controls how much of the screen the observer is seeing.
            Front row of a theatre has a field of view of around 25
            degrees. Back row has a field of view of around 60 degrees.
--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
                perceptibly different.
--gamma g : 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
--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.
--scale : Scale images to match each other's dimensions.
--sum-errors : Print a sum of the luminance and color differences.
--output foo.ppm : Saves the difference image to foo.ppm

Check that perceptualdiff is built with OpenMP support:

$ ./perceptualdiff | grep -i openmp
OpenMP status: enabled

Credits

  • Hector Yee, project administrator and originator - hectorgon.blogspot.com.
  • Scott Corley, for png file IO code.
  • Tobias Sauerwein, for make install, package_source Cmake configuration.
  • Cairo Team, for bugfixes.
  • Jim Tilander, rewrote the IO to use FreeImage.
  • Steven Myint, for OpenMP support and bug fixes.
  • Jeff Terrace, for better FreeImage support and new command-line options.

Version History

  • 1.0 - Initial distribution
  • 1.0.1 - Fixed off by one convolution error and libpng interface to 1.2.8
  • 1.0.2 - [jt] Converted the loading and saving routines to use FreeImage
  • 1.1 - Added colorfactor and downsample options. Also always output difference file if requested. Always print out differing pixels even if the test passes.
  • 1.1.1 - Turn off color test in low lighting conditions.
  • 1.1.2 - Add OpenMP parallel processing support and fix bugs.
  • 1.2 - Add --sum-errors, use more standard option style, and fix bugs.

Links

Something went wrong with that request. Please try again.