Table of Contents

NAME

icbdist - calculate the distortion between two image cubes

SYNOPSIS

icbdist [-vo] [-mse] [-snr] [-mae] [-m mask] icbfile1 icbfile2

OPTIONS

-vo
Output only the value of the distortion (terse output).
-mse
Express the distortion in terms of MSE.
-snr
Express the distortion in terms of SNR.
-mae
Express the distortion in terms of MAE.
-m mask
String. Name of file containing the transparency mask for shape-adaptive distortion.

DESCRIPTION

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.

NOTES

For 2D images, Jain defines the SNR in terms of the log of the ratio of the signal variance to the MSE. However, Clarke indicates that, historically, the SNR has not been defined consistently, and describes slightly different variants, including the variance-based definition used by Jain, as well as the log of the ratio of the mean squared signal to the MSE, a definition popular with some other authors. Clarke cautions that one must be sure of the definition of the measure when comparing SNRs as the various definitions yield different values.

icbdist is an obvious extension of Jain's definition of a variance-based SNR from 2D images to 3D image cubes.

SEE ALSO

QccIMGImageCubeMSE(3) , QccIMGImageCubeMAE(3) , QccIMGImageCubeShapeAdaptiveMSE(3) , QccIMGImageCubeShapeAdaptiveMAE(3) , QccIMGImageCube(3) , QccPackIMG(3) , QccPack(3)

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).

AUTHOR

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



Get QccPack at SourceForge.net. Fast, secure and Free Open Source software downloads