📄 imgdist.1
字号:
.TH IMGDIST 1 "QCCPACK" "".SH NAMEimgdist \- calculate the distortion between two images.SH SYNOPSIS.B imgdist.RB "[\|" \-vo "\|]".RB "[\|" \-mse "\|]".RB "[\|" \-snr "\|]".RB "[\|" \-psnr "\|]".RB "[\|" \-mae "\|]".RB "[\|" \-cie "\|]".RB "[\|" \-m.IR mask "\|]".I imgfile1.I imgfile2.SH OPTIONS.TP.B \-voOutput only the value of the distortion (terse output)..TP.B \-mseExpress the distortion in terms of MSE..TP.B \-snrExpress the distortion in terms of SNR..TP.B \-psnrExpress the distortion in terms of PSNR..TP.B \-maeExpress the distortion in terms of MAE..TP.B \-cieExpress the distortion in terms of an SNR basedon the 1964 CIE color distortion measurein the CIE Modified UCS color space. Requires that.I imgfile1and.I imgfile2be color images..TP.BI \-m " mask"String. Name of file containing the transparency mask forshape-adaptive distortion..SH DESCRIPTION.LP.B imgdistprintsthe mean square error (MSE), signal-to-noise ratio (SNR),peak signal-to-noise ratio (PSNR),maximum absolute error (MAE),or CIE-based color SNR between two image files,.I imgfile1and.IR imgfile2 ,to stdout..LPThe options.BR \-mse ,.BR \-snr ,.BR \-psnr ,.BR \-mae ,and.B \-cieindicate in which form the distortion should be expressed.If none of theseoptions are specified, .B imgdistprints the distortion in all forms..LPIf the option.B \-vois specified,then .B imgdistprints a terse output, consisting of only the value of the distortion,to stdout. One of the options.BR \-mse ,.BR \-snr ,.BR \-psnr ,.BR \-mae ,or.B \-ciemust be specified in this case..LPFor the calculation of SNR and PSNR,.B imgfile1is considered to be the original signal; .B imgdistthus finds the variance of.B imgfile1for use in the SNR calculation.For the calculation of PSNR,.B imgdistassumes that the peak-to-peak range of.B imgfile1is 255..LPIf the image files are color,the MSE, SNR, PSNR, and MAEdistortion calculations are performed separately for the Y, U, and V components of the image. The distortions for each image component areoutput in order.Additionally, for color images, a color SNR distortion based onthe 1964 CIE formula for the distance between two colorsis calculated(see.BR QccIMGImageColorSNR (3))..LPThe distortion calculation can be made "shape-adaptive"by specification of the.B \-m option, in which case.I maskgives the name of an image file that indicates thetransparency mask for the image..I maskmust be a grayscale imagein which black indicates transparency, whiteindicates full opacity, and gray tones are degrees oftranslucence(see.BR QccAlpha (3)).This transparency mask indicates which regions in.I imgfile1and .I imgfile2are to be taken into consideration in the distortion calculation---pixelsthat are marked as transparent by.I maskare ignored and are not included in either thecalculation of pixel differences or in the total count of pixels as usedin the averaging of the differences..I maskmust be the same size as both.I imgfile1and.IR imgfile2 .Note: The CIE-based color SNR distortion cannot be calculated when a maskis specified..SH "NOTES"Jain defines the SNR in terms of thelog of the ratio of the signal variance to the MSE. However, Clarkeindicates that, historically, the SNR has not been defined consistently,and describes slightly different variants, including thevariance-based definition used by Jain, as well as the log of the ratio ofthe mean squared signal to the MSE, a definition popular with someother authors. Clarke cautions that one must be sure of the definitionof the measure when comparing SNRsas the various definitions yield different values..B imgdistfollows Jain's definition of a variance-based SNR..LPSimilarly, there are inconsistent definitions of the PSNR. The most logicaldefinition involves the log of the square of the actual peak-to-peak rangeof the reference image to the MSE; this is the definition used by Jain.However, the PSNR is now nearly universally accepted as the log of thesquare of the.I maximum possiblepeak-to-peak range allowed by the pixels,a value that depends on the bit-depth of the image pixels and notthe reference image itself. For example, an8-bit image has a possible peak-to-peak range of 255, although theactual range of any given image may be less than this..B imgdistcalculates PSNR using a peak-to-peak range of 255..SH "SEE ALSO".BR QccIMGImageComponentMSE (3),.BR QccIMGImageComponentMAE (3),.BR QccIMGImageComponentShapeAdaptiveMSE (3),.BR QccIMGImageComponentShapeAdaptiveMAE (3),.BR QccIMGImageColorSNR (3),.BR QccPackIMG (3),.BR 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)..SH AUTHORCopyright (C) 1997-2009 James E. Fowler.\" The programs herein are free software; you can redistribute them and/or.\" modify them 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..\" .\" These programs are distributed in the hope that they 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..\" .\" You should have received a copy of the GNU General Public License.\" along with these programs; if not, write to the Free Software.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -