freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于哈夫曼編碼的圖像編解碼系統(tǒng)設(shè)計及實現(xiàn)畢業(yè)設(shè)計(已改無錯字)

2023-07-25 00:38:57 本頁面
  

【正文】 。 if pad0 string=[string uint8(zeros(1,pad))]。 end codeword=codeword(symbols)。 codelen=zeros(size(codeword))。 weights=2.^(0:23)。 maxcodelen=0。 for index=1:length(codeword) len=length(codeword{index})。 if lenmaxcodelen maxcodelen=len。 end if len0 code=sum(weights(codeword{index}==1))。 code=bitset(code,len+1)。 codeword{index}=code。 codelen(index)=len。 end end codeword=[codeword{:}]。 %計算壓縮后的向量 cols=length(string)/8。 string=reshape(string,8,cols)。 weights=2.^(0:7)。 zipped=uint8(weights*double(string))。 %碼表存儲到一個稀疏矩陣 huffcodes=sparse(1,1)。 for index=1:nnz(codeword) huffcodes(codeword(index),1)=symbols(index)。 end %填寫解碼時所需的結(jié)構(gòu)信息 =pad。 =huffcodes。 =cols./length(vector)。 =length(vector)。 =maxcodelen。 =m。 =n。 %huffdecode函數(shù)對輸入矩陣vector進(jìn)行Huffman編碼,%返回解壓后的圖像數(shù)據(jù)%%%%%%%%%%%%%%%%%%%%%%%%%%解碼函數(shù)%%%%%%%%%%%%%%%%%%%%%%%%%% 信息處理課群綜合訓(xùn)練與設(shè)計基于哈夫曼編碼的圖像編解碼系統(tǒng)設(shè)計及實現(xiàn)%信息SY1001班王鳴0121009320403%huffdecode函數(shù)對輸入矩陣vector進(jìn)行huffman解碼,返回解壓后的圖像數(shù)據(jù)function vector=huffdecode(zipped,info) if ~isa(zipped,39。uint839。) error(39。input argument must be a uint8 vector39。)。 end %產(chǎn)生0,1序列,每位占一個字節(jié) len=length(zipped)。 string=repmat(uint8(0),1,len.*8)。 bitindex=1:8。 for index=1:len string(bitindex+8.*(index1))=uint8(bitget(zipped(index),bitindex))。 end string=logical(string(:)39。)。 len=length(string)。 string((+1):end)=[]。 len=length(string)。 %開始解碼 weights=2.^(0:51)。 vector=repmat(uint8(0),1,)。 vectorindex=1。 codeindex=1。 code=0。 for index=1:len code=bitset(code,codeindex,string(index))。 codeindex=codeindex+1。 byte=decode(bitset(code,codeindex),info)。 if byte0 vector(vectorindex)=byte1。 codeindex=1。 code=0。 vectorindex=vectorindex+1。 end end vector=reshape(vector,)。%%%%%%%%%%%%%%%%函數(shù)frequency計算各符號出現(xiàn)的概率%%%%%%%%%%%%%%%% 信息處理課群綜合訓(xùn)練與設(shè)計基于哈夫曼編碼的圖像編解碼系統(tǒng)設(shè)計及實現(xiàn)%信息SY1001班王鳴0121009320403function f=frequency(vector)if~isa(vector,39。uint839。) error(39。in
點擊復(fù)制文檔內(nèi)容
語文相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1