0% found this document useful (0 votes)
73 views

Image Compression Using LBG Algorithm - Main

This document discusses image compression using the LBG algorithm. It loads an image file, uses the LBG algorithm to train a codebook and compress the image, decompresses the image using the codebook, and calculates the peak signal-to-noise ratio between the original and decompressed images. Key steps include finding the codebook using LBG training, encoding image pixels with codebook values, decoding using the codebook, and evaluating compression quality with PSNR.

Uploaded by

Bleu Oiseau
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views

Image Compression Using LBG Algorithm - Main

This document discusses image compression using the LBG algorithm. It loads an image file, uses the LBG algorithm to train a codebook and compress the image, decompresses the image using the codebook, and calculates the peak signal-to-noise ratio between the original and decompressed images. Key steps include finding the codebook using LBG training, encoding image pixels with codebook values, decoding using the codebook, and evaluating compression quality with PSNR.

Uploaded by

Bleu Oiseau
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

IMAGE COMPRESSION USING LBG ALGORITHM: main.m - File E...

http://www.mathworks.fr/matlabcentral/fileexchange/10457-image-com...

Search:

File Exchange Create Account Log In

File Exchange

Answers

Newsgroup

Link Exchange

Blogs

Trendy

Cody

Contest

MathWorks.com

from IMAGE COMPRESSION USING LBG ALGORITHM by AARATHY M Vector Quantization (VQ), a well-known compression technique, which has been widely used ...

No BSD License

Highlights from
main.m load parameter; [u, w, nw]=findweight(diff,wi... global para [y]=testlvq1(x) y=lvqdecode(x,v) x=imread('rice.tif'); main.m original=x; View all files % v=rand(256,16); % imwrite(uint8(v),'codebook.bmp'); [v]=trainlvq(x,0); compressed=v; %imwrite(uint8(vp),'codebook.bmp'); [y]=testlvq1(x);

IMAGE COMPRESSION USING LBG ALGORITHM

[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. Featured MathWorks.com Topics:

Site Help

Patents

Trademarks Support

Privacy Policy

Preventing Piracy Webinars

Terms of Use Newsletters MATLAB Trials Careers

New Products

Documentation

Training

1 sur 1

20/02/2013 12:35

You might also like