Welcome![Sign In][Sign Up]
Location:
Search - matlab 2f

Search list

[Compress-Decompress algrithmsSPIHT(Matlab).zip

Description:

% Matlab implementation of SPIHT (without Arithmatic coding stage)
%
% By Jing Tian, scuteejtian@hotmail.com

fprintf('-----------   Welcome to SPIHT Matlab Demo!   ----------------\n');

fprintf('-----------   Load Image   ----------------\n');
infilename = 'lena512.bmp';
outfilename = 'lena512_reconstruct.bmp';

Orig_I = double(imread(infilename));

rate = 1;

OrigSize = size(Orig_I, 1);
max_bits = floor(rate * OrigSize^2);
OutSize = OrigSize;
image_spiht = zeros(size(Orig_I));
[nRow, nColumn] = size(Orig_I);

fprintf('done!\n');
fprintf('-----------   Wavelet Decomposition   ----------------\n');
n = size(Orig_I,1);
n_log = log2(n);
level = n_log;
% wavelet decomposition level can be defined by users manually.
type = 'bior4.4';
[Lo_D,Hi_D,Lo_R,Hi_R] = wfilters(type);

[I_W, S] = func_DWT(Orig_I, level, Lo_D, Hi_D);

fprintf('done!\n');

fprintf('-----------   Encoding   ----------------\n');
img_enc = func_SPIHT_Enc(I_W, max_bits, nRow*nColumn, level);  

fprintf('done!\n');
fprintf('-----------   Decoding   ----------------\n');
img_dec = func_SPIHT_Dec(img_enc);

fprintf('done!\n');
fprintf('-----------   Wavelet Reconstruction   ----------------\n');
img_spiht = func_InvDWT(img_dec, S, Lo_R, Hi_R, level);

fprintf('done!\n');
fprintf('-----------   PSNR analysis   ----------------\n');

imwrite(img_spiht, gray(256), outfilename, 'bmp');

Q = 255;
MSE = sum(sum((img_spiht-Orig_I).^2))/nRow / nColumn;
fprintf('The psnr performance is %.2f dB\n', 10*log10(Q*Q/MSE));


Platform: | Size: 232873 | Author: jasonchang | Hits:

[matlab2fsk

Description: 自己写的2fsk调制解调程序,相比之下比较易懂。其中还附有函数程序。-Their own written procedures 2FSK modem, compared to relatively easy to understand. Which also included function procedures.
Platform: | Size: 1024 | Author: 张传志 | Hits:

[matlab7

Description: 摘 要 盲图像恢复的主要困难是信息不足,而为了恢复图像和确定点扩散函数需要适当的先验知识。解决这个问题的法、 法以及正则化方法等。但是这些方法的计算量都太大,针对上述方法的不足,文章提出了一种恢复图方法有图像的新算法,它通过恢复残差的最小化和后验概率的最大化来估计参数和恢复图像。其中,巧妙地利用了最陡梯度法和 共轭梯度法的迭代求解。对由于运动造成的模糊图像,可以明显地改善图像的质量,实验结果证明,在对模糊操作没有严格限制的情况下,仍可得到较好的恢复图像。-: : 2$*/<$ I?E L691/6@ F9MM9G:0=@ R9=? S092F 91/DE 6EC=76/=972 9C 92C:MM9G9E2= 92M761/=972$I?9C G/00C M76 L67LE6 92G76L7 ( ) =972 7M/L69769 U27R0EFDE /S7:= =?E 91/DE /2F =?E L792=8CL6E/F M:2G=972 &[ $RE008U27R CL/GE8/F/L=9OE 6ED:0/69</= 1E=?7F /2F 3+ 1E=?7F M76 91/DE 6EC=76/=972 /6E E =E2FEF =7 /FF6ECC =?9C L67S0E1$] 2ER 1E=?7F 9C L67L7CEF =7 6EC= S0:6 91/DE :C92D+5 /2F 5E/C=V:/6EC 1E=?7F$W= :CE 192919<E/G7C= M:2G=972 /2F 1/ 919<E &[ M:2G=972 =7 6EC= =?E 91/DE /2F 9FE2=9M@ =?E L/6/1E=E6C$I?9C 1E=?7F :CE C=EELEC= FECGE2= /2F G72Q:D/=E D6/F9E2= 1E=?7FC =7 192919<E , G7C= M:2G=972 /2F 1/ 919<E L7C=E69769 L67S/S909=@ =7 91L67OE =?E S0:6 91/DE X?9G? 9C /0C7 =7 91L67OE =?E 91/DE V: =@ 92 C71E FED6EE R9=? 27 C=69G= 0919=/=972$
Platform: | Size: 167936 | Author: zy | Hits:

[Algorithmformats

Description: 类似于fortran语言的格式控制 用法: s=formats(n1,s1,n2,s2,...) s1,s2为字符型,n1,n2为整型,如果值等于1,可以忽略不写 例如用于控制输出: x=rand(1,5) y=[ hello where which ] z=1:3 sprintf([ x= ,formats(5, 5.2f , \n ), y= ,formats( s , \n ), z= ,formats(3, d )],x,y ,z) formats(5, 5.2f )表示5个 5.2f格式的输出,而不用写5次了,这一点matlab 没有fotran自带的好- quick replicates simple format string and compose a complex format string Usage: s=formats(|[times1],formatstring1,|[times2],[formatstring2],...) s return times1 replicates formatstring1,then times2 replicates formatstring2, ... for example: x=rand(1,5) y=[ hello where which ] z=1:3 sprintf([ x= ,formats(5, 5.2f , \n ), y= ,formats( s , \n ), z= ,formats(3, d )],x,y ,z) See also FORMAT, REPMAT, FPRINTF, SPRINTF
Platform: | Size: 1024 | Author: zhoudg | Hits:

CodeBus www.codebus.net