필터 지우기
필터 지우기

convert integer double code huffman

조회 수: 2 (최근 30일)
slama najla
slama najla 2012년 6월 29일
Hello, can any one help me to with a malab code that help me to find a huffman code and a command or function to convert integer to double then double to integer and thanks

채택된 답변

Walter Roberson
Walter Roberson 2012년 6월 29일
DoubleValue = double(IntegerValue);
IntegerValue = uint8(DoubleValue);
  댓글 수: 2
slama najla
slama najla 2012년 6월 29일
편집: Walter Roberson 2012년 6월 29일
thank you mr Walter Roberson but my problem is in code huffman
X1=blkproc(e,[8 8],'zigzag(a)');
[M1 M2]=size(X1);
taille3=M1*M2;
XZvaH3=reshape(X1',1,taille3);
XZvaH3=uint8(XZvaH3);
[XuV,XfuV]=proba(XZvaH3);
somfuV=sum(XfuV);
XfrequV=XfuV./somfuV;
[dict1,avglen]= huffmandict(XuV,XfrequV);
codeV= huffmanenco(XZvaH3,dict1);
XZvHR = huffmandeco(codeV,dict1);
X2R=vec2mat(XZvHR,M2);
R=8;
uR=blkproc(X2R,[1 R^2],'zigzaginv(x)');
the error is in the huffman encoding for input values of type double and when I convert unit8 when decoding I do not get the original image and thanks
Walter Roberson
Walter Roberson 2012년 6월 29일

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Source Coding에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by