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

采纳的回答

Walter Roberson
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 个评论
FIR
FIR 2012-12-27
walter but why the size increases after encoding
Walter Roberson
Walter Roberson 2012-12-27
Each element of the output represents one bit. The original data was 8 bits per element.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Denoising and Compression 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by