compute the quality measure of a reconstructed image
Quality( img_r, img_s, meas, opts )
Image; reconstructed image
Image; source image
(optional) name; quality measure
(optional) equation(s) of the form option = value; specify options for the Quality command
peak = realcons
Specifies the peak value to use for the peak signal-to-noise ratio (psnr) calculation. It is ignored for the other cases. The default is 1.
The Quality command computes the quality measure of a reconstructed image with respect to a source image.
The img_r and img_s parameters are the reconstructed and the source images, respectively. They must be grayscale images and have the same width, height, and order (C_order or Fortran_order).
The optional meas parameter is a name specifying the quality measure. It can take one of the following values, the default is mse:
mse: mean-squared error. mse=sum⁡ri,j−si,j2w⁢h, where r,s are the reconstructed and source images, i,j range over all pixels, and w,h are the width and height.
rmse: root-mean-squared error (rms). rmse=mse.
snr: signal-to-noise ratio. snr=10⁢log10⁡sum⁡si,j2w⁢h⁢mse.
psnr: peak signal-to-noise ratio. psnr=10⁢log10⁡peak2mse.
img_s ≔ Create⁡100,200,r,c→evalf⁡0.5⁢sin⁡r50+0.5⁢sin⁡c30:
img_r ≔ 0.99⁢img_s+0.01:
Download Help Document