Next: snoise Up: Reference Previous: sintegral   Contents   Index

#### smse

Name

smse Computes the mean square error between two fsignals

Command Synopsis

smse [-n] Signal1 Signal2 . . . .

-n : flag to normalize the signals

Signal1 : original signal

Signal2 : reconstructed signal

. (screen output) : signal to noise ratio / Sig1 (SNR)

. (screen output) : peak signal to noise ratio / Sig1 (PSNR)

. (screen output) : mean square error between Sig1 and Sig2 (MSE)

. (screen output) : maximal relative difference (MRD)

Function Summary

void smse (Sig1 , Sig2 , Norm , SNR , PSNR , MSE , MRD )

Fsignal Sig1 , Sig2 ;

int *Norm ;

double *SNR ;

double *PSNR ;

double *MSE ;

double *MRD ;

Description

smse computes the maximal relative difference, mean square error, signal to noise ratio, and peak signal to noise ratio between two univariate digitized signals whose sample values are read in files Signal1 and Signal2.

The maximal relative difference is given by

MRD = 100×

where fi(x) is the xst sample value in signal i, i = 1, 2.

The mean square error is defined by

MSE =

where n is the number of samples in Signal1 and Signal2.

In maximal relative difference and mean square difference the two signals have symetric roles. This is no longer the case in (peak) signal to noise ratio. These quantities can be calculated for any two signals, but are more meaningful if f1 is considered as an original signal and f2 as an approximation to it. The signal to noise ratio and peak signal to noise ratio are defined as follows

SNR = 10×log10

PSNR = 10×log10

where is the empirical variance of the original signal.

The -n option specifies that the two signals are normalized to 0.0 mean and 1.0 variance before the computation of the quantities listed above.

Version 1.02

Last Modification date : Thu Apr 15 01:04:32 2004

Author

Jean-Pierre D'Ales, Jacques Froment

Next: snoise Up: Reference Previous: sintegral   Contents   Index
mw 2004-05-05