deal_levels

PURPOSE ^

REPARTO_NIVELES returns the weight functions from a linear response model.

SYNOPSIS ^

function k=deal_levels(tam,fs,opcion,Fc,Pesos);

DESCRIPTION ^

 REPARTO_NIVELES returns the weight functions from a linear response model.

 Passing the result to respue_lin this scale DCTs in contrast for
 each channel, preparing them for the quantization. The result is
 equivalent to the inverse of a row of JPEG quantization matrices.

 This program allows you to generate multiple profiles sharing:

 Option = 1 of CSFs with scaling Kelly Mullen

 Option = 2 Ngan CSF for the achromatic channel and CSFs Kelly for chromatic

 Option = 3 low-pass filters with tunable frequency cut

 Option = 4 uniform Profile

 USE: [k1]=reparto_niveles(tam,fs,opcion,Fc);

     tam = DCT block size
     fs  = sampling frequency (cl/grad)
     opcion = Profile
     Fc = cut frequency (option 3)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % REPARTO_NIVELES returns the weight functions from a linear response model.
0002 %
0003 % Passing the result to respue_lin this scale DCTs in contrast for
0004 % each channel, preparing them for the quantization. The result is
0005 % equivalent to the inverse of a row of JPEG quantization matrices.
0006 %
0007 % This program allows you to generate multiple profiles sharing:
0008 %
0009 % Option = 1 of CSFs with scaling Kelly Mullen
0010 %
0011 % Option = 2 Ngan CSF for the achromatic channel and CSFs Kelly for chromatic
0012 %
0013 % Option = 3 low-pass filters with tunable frequency cut
0014 %
0015 % Option = 4 uniform Profile
0016 %
0017 % USE: [k1]=reparto_niveles(tam,fs,opcion,Fc);
0018 %
0019 %     tam = DCT block size
0020 %     fs  = sampling frequency (cl/grad)
0021 %     opcion = Profile
0022 %     Fc = cut frequency (option 3)
0023 %
0024 
0025 function k=deal_levels(tam,fs,opcion,Fc,Pesos);
0026 
0027 f=linspace(0,fs/2-(fs/2)/tam,tam);
0028 
0029 if opcion==1
0030 
0031     factores_sobre_crom=[0.75 0.55];
0032 
0033     facfrecy=0.95;
0034     [IAFet,CSFy]=iafet(f,facfrecy,0,0,[0 0 0],0);
0035 
0036     facfrecrg=2.5;
0037     [iaf_rg,CSFrg]=iafrg(f,0,facfrecrg,[0 0 0]);
0038     facfrecyb=1.8;
0039     [iaf_yb,CSFyb]=iafyb(f,0,facfrecyb,[0 0 0]);
0040 
0041     CSFy=CSFy/maxi(CSFy);
0042     CSFrg=factores_sobre_crom(1)*CSFrg/maxi(CSFrg);
0043     CSFyb=factores_sobre_crom(2)*CSFyb/maxi(CSFyb);
0044 
0045     k=[CSFy;CSFyb;CSFrg];
0046 
0047 elseif opcion==2
0048 
0049     factores_sobre_crom=[0.75 0.55];
0050 
0051     [CSFy,logciaf]=ngan(fs/2-(fs/2)/tam,tam);
0052 
0053     facfrecrg=2.5;
0054     [iaf_rg,CSFrg]=iafrg(f,0,facfrecrg,[0 0 0]);
0055     facfrecyb=1.8;
0056     [iaf_yb,CSFyb]=iafyb(f,0,facfrecyb,[0 0 0]);
0057 
0058     CSFy=CSFy/maxi(CSFy);
0059     CSFrg=factores_sobre_crom(1)*CSFrg/maxi(CSFrg);
0060     CSFyb=factores_sobre_crom(2)*CSFyb/maxi(CSFyb);
0061 
0062     k=[CSFy;CSFyb;CSFrg];
0063 
0064 elseif opcion==3
0065 
0066     k=double([f<=Fc(1);f<=Fc(2);f<=Fc(3)]);
0067 
0068 else
0069 
0070     k=ones(3,tam);
0071 
0072 end
0073 
0074 k(1,:)=Pesos(1)*k(1,:);
0075 k(2,:)=Pesos(2)*k(2,:);
0076 k(3,:)=Pesos(3)*k(3,:);
0077

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