PANDORE Version 6 | GREYC-IMAGE |
psnr measures the ratio between the meaningful information and
the noise in an image.
It is computed from the two input images: im_in1 is the initial
image that contains the
signal and noise and im_in2 is the restored or enhanced version of
im1_in that is
supposed to contain only meaningful information.
Consequently, the higher is the SNR, the better is the signal and
better is the related image processing (restoration or enhancement).
Because many signals have a very wide dynamic range, SNR is expressed in terms of decibel (dB).
SNR is defined as follows:
S = 10*log10(R12) R12 = sum {(ims1)2} / sum (ims2-ims1)2}
Input images im_in1 and im_in2 must have the same dimensions and the same type.
For color or multispectral images, the definition of SNR is the same except that each sum uses all bands.
Note: R12 is dependent not only on the difference ims1-ims2, but also on ims1. Thus, the signal-to-noise ratio value is dependent to input images and is often used for processing comparison with the same input images.
Computes the SNR after a meanfilter smoothing:
pmeanfiltering 2 tangram.pan i1.pan psnr tangram.pan i1.pan pstatus
Returns the ratio value as a positive real value expressed in dB.
(Use pstatus
to get this value).
Calcul du rapport signal sur bruit.
Author: Régis Clouard