Size increases after encoding
조회 수: 3 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Walter Roberson
2012년 12월 25일
Remember, comp is representing binary, and so is 1 bit per element, whereas your original data is at least 8 bits per element.
댓글 수: 6
참고 항목
카테고리
Help Center 및 File Exchange에서 Large Files and Big Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!