Image Comparison: imf_diff

The image comparison utility for mental ray. It supports all image formats and types that mental ray generates. It allows to detect and display differences between two images.

Usage

The image compare utility is started as:

imf_diff [options] image1 image2 [outimage [outtype]]

The files image1 and image2 will be compared, and a comparison summary is printed. If outimage is specified, a difference image with a histogram is written to outimage. The file format of this file is specified with outtype if present, or taken from the file name extension if not.

Options

The following options are supported:

-a
Ignore alpha channel differences.
-d
Display the difference image and the histogram in a window, by starting the imf_disp program. This works with and without an outimage on the command line.
-e
Write an output image even if the compared input images match. Normally the output image is written only if there are differences.
-f
Show differences in false colors, ranging from irrelevant differences in blue, through significant differences in green, red, and white.
-g gamma
Perform gamma correction with the given gamma factor.
-h
Print brief help text.
-m thresh
Set the threshold in the range 0..255. Component differences less than this threshold are ignored. The default is 3. The main purpose is to discard differences introduced by dithering (mental ray's dither option).
-n
Do not add a histogram to the displayed or saved output image.
-s
Magnify the differences such that the largest difference is white and appears at the right edge of the histogram.
-t thresh
The difference in percent that causes imf_diff to return the return code 1 instead of 0. The default is 1. This is useful for automated test suites.
-u
Underlay image1 under the displayed or saved difference image, at 1/10th brightness. This helps locating differences.
-v
Print verbose progress messages and version banner.

The most common options are -f -u -d (also known as fear, uncertainty, and doubt).

Note The sampling strategy of mental ray implies that the true image is approximated with appropriately selected samples until the desired image quality criteria are satisfied. This approach ensures consistent quality but it does not necessarily create images that are bit-for-bit identical if rendered under different circumstances, such as different image task sizes, image task assignments to threads or machines, different machines or different networks, or different sampling options. Typically, differences shown in blue in the color histogram are irrelevant.

Copyright © 1986, 2015 NVIDIA ARC GmbH. All rights reserved.