how to get decompressed image for wcompress function ,and how to convert compressed image to binary?

1 view (last 30 days)
i use wcompress to compress gray scale image.know i have the original image X and compressed image Xc i want to know how to get the decompressed image and how to convert compressed image to binary (no of bit per pixel<8) http://www.mathworks.com/help/wavelet/ref/wcompress.html
load mask;
[cr,bpp] = wcompress('c',X,'mask.wtc','spiht','maxloop',12)
% Then, it shows how to load the stored image from the file
% 'mask.wtc', uncompress it and delete the file 'mask.wtc'.
Xc = wcompress('u','mask.wtc');
delete('mask.wtc')
% The orginal and compressed images are displayed.
colormap(pink(255))
subplot(1,2,1); image(X); title('Original image')
axis square
subplot(1,2,2); image(Xc); title('Compressed image')
axis square

Answers (0)

Categories

Find more on Denoising and Compression in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!