retrieving image after encoding

1 Ansicht (letzte 30 Tage)
FIR
FIR am 26 Dez. 2012
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

Akzeptierte Antwort

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Large Files and Big Data finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by