www.gusucode.com > wavelet 源码程序 matlab案例代码 > wavelet/ImageCompressionAndUncompressionUsingAdvancedParametersExample.m
%% Image Compression and Uncompression Using Advanced Parameters. % % This example show how to compress a jpeg image using the adaptively % scanned wavelet difference reduction compression method (|'aswdr'|). The % conversion color (|'cc'|) uses the Karhunen-Loeve transform (|'kit'|). % The maximum number of loops (|'maxloop'|) is set to 11 and the plot % type (|'plotpar'|) is set to step through the compression. Show the % compression ratio (|cratio|) and the bit-per-pixel ratio (|bpp|), which % indicate the quality of the compression. [cratio,bpp] = wcompress('c','woodstatue.jpg','woodstatue.wtc', ... 'aswdr','cc','klt','maxloop',11,'plotpar','step'); cratio bpp %% % Load the compressed image and step through the uncompression process. wcompress('u','woodstatue.wtc','step');