computing_distortions_c
PURPOSE 
It computes RMSE, SSIM, linear MPE, non-linear MPE and non-linear JMLR MPE
SYNOPSIS 
function [RMSE,SSIM,MPEl,MPEnlJMLR,SCIELab] = computing_distortions_c(Im,ImR,pesos,exp_sum)
DESCRIPTION 
CROSS-REFERENCE INFORMATION 
This function calls:
- my_rgb2yuv MY_RGB2YUV computes the true color image YUV given a true color RGB image by
This function is called by:
- entropy_jpeg It iterates the algorithm for some entropy values. It fits the
- entropy_nl_svr It iterates the algorithm for some entropy values. It fits the
SOURCE CODE 
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 function [RMSE,SSIM,MPEl,MPEnlJMLR,SCIELab] = computing_distortions_c(Im,ImR,pesos,exp_sum)
0013 Im = double(Im);
0014 ImR= double(ImR);
0015 if(nargin < 3)
0016 pesos = [1/3 1/3 1/3];
0017 exp_sum = 1;
0018 elseif(nargin < 4)
0019 exp_sum = 1;
0020 end
0021 [Nf Nc N] = size(Im);
0022 RMSEn = zeros(N,1);
0023 SSIMn = zeros(N,1);
0024 RMSE = 0;
0025 SSIM = 0;
0026 MPEl = 0;
0027 MPEnlJMLR = 0;
0028 if(N == 3)
0029
0030 ImYUV = my_rgb2yuv(double(Im));
0031 ImRYUV = my_rgb2yuv(double(ImR));
0032 end
0033 for capa = 1:N
0034 if(N == 3)
0035
0036 SSIMn(capa) = 0;
0037 else
0038
0039 SSIMn(capa) = 0;
0040 end
0041 end
0042 for i = 1:N
0043
0044 SSIM = SSIM + pesos(i) * SSIMn(i);
0045 end
0046 RMSE = sqrt( sum((Im(:)-ImR(:)).^2) / numel(Im) );
0047 if((nargout > 4) && (N == 3))
0048 Im = double(Im);
0049 ImR = double(ImR);
0050
0051 SCIELab = 0;
0052 end
Generated on Fri 07-Mar-2014 13:29:20 by m2html © 2005