Size increases after encoding
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Finally i got through the problem in huffman encoding,but the size after encoding increases,please help
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);
numel(comp)
ans =
167343
>> numel(A)
ans =
65536
0 Commenti
Risposte (1)
Walter Roberson
il 25 Dic 2012
Remember, comp is representing binary, and so is 1 bit per element, whereas your original data is at least 8 bits per element.
6 Commenti
Vedere anche
Categorie
Scopri di più su Import, Export, and Conversion in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!