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

正文內(nèi)容

基于哈夫曼編碼的圖像編解碼系統(tǒng)設(shè)計(jì)及實(shí)現(xiàn)畢業(yè)設(shè)計(jì)(編輯修改稿)

2024-07-21 00:38 本頁面
 

【文章內(nèi)容簡介】 ex+1;byte = (bitset (code,codeindex));%從碼字表中讀出對(duì)應(yīng)元素if byte0;vector(vectorindex)=byte1;codeindex=1;code=0;vectorindex=vectorindex+1;(5)顯示編碼的壓縮信息(如壓縮率、最大碼長等),部分程序如下所示:whos data huffcode huffdecode %顯示壓縮效果fprintf(39。pad=%d\n39。,); %=為湊整字節(jié)數(shù),編碼字符串最后添加零的位數(shù)fprintf (39。ratio=%f\n39。,); %=壓縮率fprintf (39。maxcodelen=%d\n39。,);%=最大碼長系統(tǒng)設(shè)計(jì)的完整主程序如下%%%%%%%%%%%%%%%%%%%%%%%%%主程序%%%%%%%%%%%%%%%%%%%%%%%%%%%% 信息處理課群綜合訓(xùn)練與設(shè)計(jì)基于哈夫曼編碼的圖像編解碼系統(tǒng)設(shè)計(jì)及實(shí)現(xiàn)%信息SY1001班王鳴0121009320403clcclearcd。X=imread(39。39。)。data=uint8(X)。 [zipped,info]=huffencode(data)。 unzipped=huffdecode(zipped,info)。subplot(121)。imshow(data)。title(39。原始圖像39。)subplot(122)。imshow(unzipped)。title(39。解碼后的圖像39。)whos data unzipped zippedfprintf(39。pad=%d\n39。,)。 %=為湊整字節(jié)數(shù),編碼字符串最后添加零的位數(shù)fprintf(39。ratio=%f\n39。,)。 %=壓縮率fprintf(39。maxcodelen=%d\n39。,)。%=最大碼長主程序中使用的函數(shù)代碼如下%%%%%%%%%%%%%%%%%%%%%%%%%%編碼函數(shù)%%%%%%%%%%%%%%%%%%%%%%%%%%% 信息處理課群綜合訓(xùn)練與設(shè)計(jì)基于哈夫曼編碼的圖像編解碼系統(tǒng)設(shè)計(jì)及實(shí)現(xiàn)%信息SY1001班王鳴0121009320403%huffencode函數(shù)對(duì)輸入矩陣vector進(jìn)行huffman編碼,返回編碼后的向量及相關(guān)信息function [zipped,info]= huffencode(vector) if ~isa(vector,39。uint839。) eror(39。input argument must be a uint8 vector39。)。 end [m,n]=size(vector)。 vector=vector(:)39。 f=frequency(vector)。 symbols=find(f~=0)。 f=f(symbols)。 [f,sortindex]=sort(f)。 symbols=symbols(sortindex)。 len=length(symbols)。 symbols_index=num2cell(1:len)。 codeword_tmp=cell(len,1)。 while length(f)1 index1=symbols_index{1}。 index2=symbols_index{2}。 codeword_tmp(index1)=addnode(codeword_tmp(index1),uint8(0))。 codeword_tmp(index2)=addnode(codeword_tmp(index2),uint8(1))。 f=[sum(f(1:2)) f(3:end)]。 symbols_index=[{[index1,index2]} symbols_index(3:end)]。 [f,sortindex]=sort(f)。 symbols_index=symbols_index(sortindex)。 end codeword=cell(256,1)。 codeword(symbols)=codeword_tmp。 len=0。 for index=1:length(vector) len=len+length(codeword{double(vector(index))+1})。 end string=repmat(uint8(0),1,len)。 pointer=1。 for index=1:length(vector) code=codeword{double(vector(index))+1}。 len=length(code)。 string(pointer+(0:len1))=code。 pointer=pointer+len。 end len=length(string)。 pad=8mod(len,8)
點(diǎn)擊復(fù)制文檔內(nèi)容
語文相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1