fitting_epsilon_SSIM

PURPOSE ^

sentido = 1 -> Increassing epsilon (i.e. increasing the distortion parameter)

SYNOPSIS ^

function [epsilon, l_min, l_max, porcentaje, sentido] = fitting_epsilon_SSIM(SSIM, SSIM_actual, epsilon, l_min, l_max, porcentaje, sentido)

DESCRIPTION ^

 sentido = 1 -> Increassing epsilon (i.e. increasing the distortion parameter)
 sentido = 0 -> Decreassing epsilon (i.e. decreasing the distortion parameter)
 l_min       -> Lower epsilon limit
 l_max       -> Upper epsilon limit

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 
0002 % sentido = 1 -> Increassing epsilon (i.e. increasing the distortion parameter)
0003 % sentido = 0 -> Decreassing epsilon (i.e. decreasing the distortion parameter)
0004 % l_min       -> Lower epsilon limit
0005 % l_max       -> Upper epsilon limit
0006 function [epsilon, l_min, l_max, porcentaje, sentido] = fitting_epsilon_SSIM(SSIM, SSIM_actual, epsilon, l_min, l_max, porcentaje, sentido)
0007 if((SSIM - SSIM_actual > 0) & (sentido == 1))
0008 
0009     porcentaje = porcentaje / 2;
0010 
0011     if(porcentaje >= 1)
0012         porcentaje = 0.25;
0013     end
0014 
0015     l_max = epsilon;
0016 
0017     epsilon = (1 - porcentaje) * epsilon;
0018 
0019     if(epsilon < l_min)
0020         epsilon = (l_min + l_max)/2;
0021     end
0022 
0023     sentido = 0;
0024     return;
0025 end
0026 
0027 if((SSIM - SSIM_actual < 0) & (sentido == 1))
0028 
0029     l_min = epsilon;
0030 
0031     epsilon = (1 + porcentaje) * epsilon;
0032 
0033     if(epsilon > l_max)
0034         epsilon = (l_min + l_max)/2;
0035     end
0036 
0037     sentido = 1;
0038 
0039     porcentaje = 2 * porcentaje;
0040     return;
0041 end
0042 
0043 if((SSIM - SSIM_actual < 0) & (sentido == 0))
0044 
0045     porcentaje = porcentaje / 2;
0046 
0047     l_min = epsilon;
0048 
0049     epsilon = (1 + porcentaje) * epsilon;
0050 
0051     if(epsilon > l_max)
0052         epsilon = (l_min + l_max)/2;
0053     end
0054 
0055     sentido = 1;
0056     return;
0057 end
0058 
0059 if((SSIM - SSIM_actual > 0) & (sentido == 0))
0060 
0061     if(porcentaje >= 1)
0062         porcentaje = 0.25;
0063     end
0064 
0065     l_max = epsilon;
0066 
0067     epsilon = (1 - porcentaje) * epsilon;
0068 
0069     if(epsilon < l_min)
0070         epsilon = (l_min + l_max)/2;
0071     end
0072 
0073     sentido = 0;
0074 
0075     porcentaje = 2 * porcentaje;
0076     return;
0077 end

Generated on Fri 07-Mar-2014 13:29:20 by m2html © 2005