retrieving image after encoding

조회 수: 1 (최근 30일)
FIR
FIR 2012년 12월 26일
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에서 Large Files and Big Data에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by