retrieving image after encoding
7 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
Walter Roberson
2012-12-26
"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.
7 个评论
Walter Roberson
2012-12-27
Each element of the output represents one bit. The original data was 8 bits per element.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Denoising and Compression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!