image compression using lbg algorithm_ main

1
Search: File Exchange Site Help Patents Trademarks Privacy Policy Preventing Piracy Terms of Use Featured MathWorks.com Topics: New Products Support Documentation Training Webinars Newsletters MATLAB Trials Careers Create Account Log In File Exchange Answers Newsgroup Link Exchange Blogs Trendy Cody Contest MathWorks.com No BSD License Highlights from IMAGE COMPRESSION USING LBG ALGORITHM [u, w, nw]=findweight(diff,wi... [y]=testlvq1(x) y=lvqdecode(x,v) main.m View all files from IMAGE COMPRESSION USING LBG ALGORITHM by AARATHY M Vector Quantization (VQ), a well-known compression technique, which has been widely used ... main.m load parameter; global para x=imread('rice.tif'); original=x; % v=rand(256,16); % imwrite(uint8(v),'codebook.bmp'); [v]=trainlvq(x,0); compressed=v; %imwrite(uint8(vp),'codebook.bmp'); [y]=testlvq1(x); [psnrvalue]=psnr(original,y,255); % error=0; % for y=1:240 % for x=1:291 % MSE=(((Original(x,y))-(DecompressedImage(x,y)))^2); % error=MSE+error; % end % end % MSE=(1/(291*240))*error; % disp('PSNR'); % PSNR=20*log10(255/sqrt(MSE)); % disp(PSNR); % figure,imshow(original); title('Original Image'); % figure,imshow(compressed); % title('compressed Image'); figure,imshow(uint8(y)); title('Decompressed Image'); Contact us © 1994-2013 The MathWorks, Inc. IMAGE COMPRESSION USING LBG ALGORITHM: main.m - File E... http://www.mathworks.fr/matlabcentral/fileexchange/10457-image-com... 1 sur 1 20/02/2013 12:35

Upload: bleu-oiseau

Post on 14-Apr-2015

18 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Image Compression Using Lbg Algorithm_ Main

Search: File Exchange

Site Help Patents Trademarks Privacy Policy Preventing Piracy Terms of Use

Featured MathWorks.com Topics: New Products Support Documentation Training Webinars Newsletters MATLAB Trials Careers

Create Account Log In

File Exchange Answers Newsgroup Link Exchange Blogs Trendy Cody Contest MathWorks.com

No BSD License

Highlights fromIMAGE COMPRESSIONUSING LBG ALGORITHM

[u, w, nw]=findweight(diff,wi...

[y]=testlvq1(x)

y=lvqdecode(x,v)

main.m

View all files

from IMAGE COMPRESSION USING LBG ALGORITHM

by AARATHY M

Vector Quantization (VQ), a well-known compressiontechnique, which has been widely used ...

main.m

load parameter;

global para

x=imread('rice.tif');

original=x;

% v=rand(256,16);% imwrite(uint8(v),'codebook.bmp');

[v]=trainlvq(x,0);compressed=v;

%imwrite(uint8(vp),'codebook.bmp');

[y]=testlvq1(x);

[psnrvalue]=psnr(original,y,255);

% error=0;% for y=1:240% for x=1:291% MSE=(((Original(x,y))-(DecompressedImage(x,y)))^2);% error=MSE+error;% end% end% MSE=(1/(291*240))*error; % disp('PSNR');% PSNR=20*log10(255/sqrt(MSE));% disp(PSNR);% figure,imshow(original);title('Original Image'); % figure,imshow(compressed);% title('compressed Image');

figure,imshow(uint8(y));title('Decompressed Image');

Contact us

© 1994-2013 The MathWorks, Inc.

IMAGE COMPRESSION USING LBG ALGORITHM: main.m - File E... http://www.mathworks.fr/matlabcentral/fileexchange/10457-image-com...

1 sur 1 20/02/2013 12:35