Image compression in matlab with explaination




Image compression
Wcompress command:
The wcompress command performs either compression or uncompression of grayscale or truecolor images.
Spiht parameter of wcompress:
spiht'
Set Partitioning In Hierarchical Trees
Xc = wcompress('u','wpeppers.wtc');
uncompresses the file SAV_FILENAME, which contains the compressed image, and returns the image XC. Depending on the initial compressed image, XC can be a 2-D array containing either an indexed image or a 3-D array of uint8 containing a truecolor image.
[CR,BPP] = wcompress('c',X,'wpeppers.wtc','spiht','maxloop',12);
[COMPRAT,BPP] = wcompress('c',...) returns the compression ratio COMPRAT and the bit_per_pixel ratio BPP.`
Comprat states the compression ratio

BPP' = 'bpp' or 'BPP' sets the bit-per-pixel ratio.
'c' : color transformation type (RGB uint8).
axis square;
axis square makes the current axes region square (or cubed when three-dimensional). This option adjusts the x-axis, y-axis, and z-axis so that they have equal lengths and adjusts the increments between data units accordingly.
xlabel({['Compression Ratio: ' num2str(CR,'%1.2f %%')], ...
        ['BPP: ' num2str(BPP,'%3.2f')]})
xlabel(txt) labels the x-axis of the current axes or chart returned by the gca command.
 num2str   Convert numbers to character array.

output


Comments

Popular posts from this blog

Data Types in Matlab

Face detection in Matlab with source code