fitting_uCP_entropy
PURPOSE 
sentido = 1 -> Increassing uCP (i.e. increasing the entropy)
SYNOPSIS 
function [uCP, l_min, l_max, porcentaje, sentido] = ajuste_uCP_SSIM_entropia(entropia, entropia_actual, uCP, l_min, l_max, porcentaje, sentido)
DESCRIPTION 
CROSS-REFERENCE INFORMATION 
This function calls:
This function is called by:
SOURCE CODE 
0001
0002
0003
0004
0005
0006 function [uCP, l_min, l_max, porcentaje, sentido] = ajuste_uCP_SSIM_entropia(entropia, entropia_actual, uCP, l_min, l_max, porcentaje, sentido)
0007 if((entropia - entropia_actual > 0) & (sentido == 1))
0008
0009 l_min = uCP;
0010
0011 uCP = (1 + porcentaje) * uCP;
0012
0013 if(uCP > l_max)
0014 uCP = (l_min + l_max)/2;
0015 end
0016
0017 sentido = 1;
0018
0019 porcentaje = 1.5 * porcentaje;
0020 return;
0021 end
0022
0023 if((entropia - entropia_actual < 0) & (sentido == 1))
0024
0025 porcentaje = porcentaje / 2;
0026
0027 if(porcentaje >= 1)
0028 porcentaje = 0.25;
0029 end
0030
0031 l_max = uCP;
0032
0033 uCP = (1 - porcentaje) * uCP;
0034
0035 if(uCP < l_min)
0036 uCP = (l_min + l_max)/2;
0037 end
0038
0039 sentido = 0;
0040 return;
0041 end
0042
0043 if((entropia - entropia_actual < 0) & (sentido == 0))
0044
0045 if(porcentaje >= 1)
0046 porcentaje = 0.25;
0047 end
0048
0049 l_max = uCP;
0050
0051 uCP = (1 - porcentaje) * uCP;
0052
0053 if(uCP < l_min)
0054 uCP = (l_min + l_max)/2;
0055 end
0056
0057 sentido = 0;
0058
0059 porcentaje = 1.5 * porcentaje;
0060 return;
0061 end
0062
0063 if((entropia - entropia_actual > 0) & (sentido == 0))
0064
0065 porcentaje = porcentaje / 2;
0066
0067 l_min = uCP;
0068
0069 uCP = (1 + porcentaje) * uCP;
0070
0071 if(uCP > l_max)
0072 uCP = (l_min + l_max)/2;
0073 end
0074
0075 sentido = 1;
0076 return;
0077 end
Generated on Fri 07-Mar-2014 13:29:20 by m2html © 2005