MATLAB: Retrieving image after encoding

retrieve

my code is
A=imread('imagcp.bmp');
A=A(:);
YourVector=double(A);
symbols = unique(YourVector(:));
counts = hist(YourVector(:), symbols);
p = double(counts) ./ sum(counts)
[dict,avglen]=huffmandict(symbols,p);
comp=huffmanenco(A,dict);
I want to dispaly image after encoding,plz help

Best Answer

"comp" is not something that can be displayed. You need to do a huffman decoding of "comp" with "dict" in order to restore the image.
Related Question