icbdist prints the mean square error (MSE), signal-to-noise ratio (SNR), or maximum absolute error (MAE) between two image-cube files, icbfile1 and icbfile2, to stdout. icbfile1 and icbfile2 are both ICB-format files.
The options -mse, -snr, and -mae indicate in which form the distortion should be expressed. If none of these options are specified, icbdist prints the distortion in all forms.
If the option -vo is specified, then icbdist prints a terse output, consisting of only the value of the distortion, to stdout. One of the options -mse, -snr, or -mae must be specified in this case.
For the calculation of SNR, icbfile1 is considered to be the original signal; icbdist thus finds the variance of icbfile1 for use in the SNR calculation.
The distortion calculation can be made "shape-adaptive" by specification of the -m option, in which case mask gives the name of an image-cube file (ICB format) that indicates the transparency mask for the image. Withing mask, values less than or equal to QCCALPHA_TRANSPARENT indicate transparency (see QccAlpha(3) ). This transparency mask indicates which regions in icbfile1 and icbfile2 are to be taken into consideration in the distortion calculation---voxels that are marked as transparent by mask are ignored and are not included in either the calculation of voxel differences or in the total count of voxels as used in the averaging of the differences. mask must be the same size as both icbfile1 and icbfile2.
icbdist is an obvious extension of Jain's definition of a variance-based SNR from 2D images to 3D image cubes.
Anil K. Jain, "Fundamentals of Digital Image Processing." Englewood Cliffs, NJ: Prentice Hall, 1989. (See Chapter 3).
Roger J. Clarke, "Digital Compression of Still Images and Video." London: Academic Press Ltd., 1995. (see Section 1.2.7).