KeCoDe_DECODER_COLOR decompress the files encoded with KeCoDe_ENCODER_COLOR Given the folder and the name of the file to decompress, the program identifies the required decoder to recover the image. SYNTAX: im=KeCoDe_decoder_color('folder','name') Input 'folder' = String with the folder containing the file to decompress 'name' = String with the name of the file to decompress (do not include the 'zip' extension!) Note that the names have to include the algorithm identifiers given by KeCoDe_ENCODER_COLOR.M.
0001 0002 % 0003 % KeCoDe_DECODER_COLOR decompress the files encoded with KeCoDe_ENCODER_COLOR 0004 % 0005 % Given the folder and the name of the file to decompress, the program identifies the 0006 % required decoder to recover the image. 0007 % 0008 % SYNTAX: 0009 % 0010 % im=KeCoDe_decoder_color('folder','name') 0011 % 0012 % Input 0013 % 'folder' = String with the folder containing the file to decompress 0014 % 'name' = String with the name of the file to decompress (do not include the 'zip' extension!) 0015 % Note that the names have to include the algorithm identifiers 0016 % given by KeCoDe_ENCODER_COLOR.M. 0017 % 0018 0019 function ImR = KeCoDe_decoder_color(directorio,fichero) 0020 normaliz = 1; 0021 To = [100 0 0]; 0022 dUmax = 40; 0023 dVmax = 43; 0024 niveles = 1; 0025 cd(directorio); 0026 if(~isempty(findstr(fichero,'jpeg91_c'))) 0027 ImR = jpeg91_c_decoder(normaliz,To,dUmax,dVmax,directorio,fichero,niveles); 0028 elseif(~isempty(findstr(fichero,'gutierrez09_c'))) 0029 K=kernel2d_variance(16,1); 0030 exponentes=[2 2 2]; 0031 tipo_alfa=1; 0032 ImR = svr_nl_c_decoder_cs(normaliz,To,dUmax,dVmax,K,exponentes,tipo_alfa,directorio,fichero); 0033 else 0034 disp('The decoding algorithm cannot be obtained from the file name!'); 0035 end