imgcmp
[options]
The imgcmp command compares two images. The two images being compared must have the same geometry (i.e., the same width, height, number of components, component subsampling factors, etc.).
The following options are supported:
--help
--version
--verbose
-f $file
$file
.-F $file
$file
.-m $metric
$metric
. The $metric
argument may assume one of the following values:psnr
: peak signal to noise ratio (PSNR)mse
: mean squared error (MSE)rmse
: root mean squared error (RMSE)pae
: peak absolute error (PAE)mae
: mean absolute error (MAE)equal
: equality--memory-limit $n
$n
bytes.--debug-level $level
$level
.The -f
and -F
options must always be specified. There is currently no way to explicitly specify the format of the images. If the format of either image cannot be autodetected, the command will exit with an error.
Suppose that we have two slightly different versions of an image stored in files original.pgm
and reconstructed.pgm
. In order to calculate the difference between these images using the PSNR metric, use the command:
imgcmp -f original.pgm -F reconstructed.pgm -m psnr