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

正文內(nèi)容

圖像統(tǒng)計(jì)編碼演示程序的設(shè)計(jì)_畢業(yè)設(shè)計(jì)論文-在線瀏覽

2024-11-03 19:06本頁(yè)面
  

【正文】 ,得均方根誤差 cr = whos data unzipped zipped function [zipped, info] = huffencode(vector) %函數(shù)聲明, huffencode 對(duì)輸入矩陣 vector 進(jìn)行Huffman 編碼 %輸入和輸出都是 uint8 格式 if~isa(vector, 39。) %若矩陣 vector 是給定類時(shí),為真 error(39。)。 %檢查矩陣的階數(shù) vector = vector( :)39。 %計(jì)算各符號(hào)出現(xiàn)的概率 symbols = find(f~=0)。 第 8 頁(yè) 共 19 頁(yè) [f, sortindex] = sort(f)。 len = length(symbols)。 %把數(shù)字?jǐn)?shù)組變換為單元陣列 codeword_tmp = cell(len, 1)。 index2 = symbols_index{2}。 codeword_tmp(index2) = addnode(codeword_tmp(index2), uint8(1))。 symbols_index = [{[index1,index2]} symbols_index(3:end)]。 %將各符號(hào)的概率列向重新排列 symbols_index = symbols_index(sortindex)。 %建立單元陣列 codeword(symbols) = codeword_tmp。 for index = 1:length(vector) %得到整個(gè)圖像所有比特?cái)?shù) len = len + length(codeword{double(vector(index)) +1})。 pointer = 1。 len = length(code)。 pointer = pointer + len。 pad = 8mod(len, 8)。 end codeword = codeword(symbols)。 weights = 2.^(0:23)。 for index = 1:length(codeword) len = length(codeword{index})。 end if len0 code = sum(weights(codeword{index} ==1))。 codeword{index} = code。 end 第 9 頁(yè) 共 19 頁(yè) end codeword = [codeword{:}]。 %將字符串的長(zhǎng)度除以 8,得到列數(shù) string = reshape(string,8,cols)。 zipped = uint8(weights*double(string))。 %碼表存儲(chǔ)到一個(gè)稀疏矩陣 for index = 1:nnz(codeword) %length(codeword), numel(codeword) huffcodes(codeword(index),1) = symbols(index)。 %添加的比特?cái)?shù) = huffcodes。 %顯示原始圖像的列數(shù)除以矩陣長(zhǎng)度的值 = length(vector)。 %顯示最大碼長(zhǎng) = m。 %顯示原始圖像的列數(shù) function vector = huffdecode(zipped,info,image) %huffdecode 函數(shù)對(duì)輸入矩陣 vector 進(jìn)行 Huffman 解碼,返回解壓后的圖像數(shù)據(jù) if~isa(zipped,39。) error(39。)。 %產(chǎn)生 0、 1 序列,每位占一個(gè)字節(jié) string = repmat(uint8(0),1,len.*8)。 for index = 1:len string(bitindex+8.*(index1)) = uint8(bitget(zipped(index),bitindex))。)。 string((+1):end)=[]。 weights = 2.^(0:51)。 vectorindex = 1。 code = 0。 codeindex = codeindex+1。 if byte0 vector(vectorindex) = byte1。 code = 0。 end end vector = reshape(vector,)。 for index = 1:length(codeword_old) codeword_new{index} = [item codeword_old{index}]。uint839。input rgument must be a uint8 vector39。 end f =repmat(0,1,256)。 for index = 0:255 f(index+1) = sum(vector ==uint8(index))。 function byte = decode(code, info) %函數(shù) decode 返回碼字對(duì)應(yīng)的符號(hào) byte = (code)。 format long e。abcd39。 %將信源符號(hào)定義為符號(hào)函數(shù),四個(gè)信源符號(hào)分別為 a、 b、 c、 d ps = [ ]。cadacdb39。 %設(shè)定某一消息序列 codeword = arithencode(symbol,ps,inseq) outseq = arithdecode(symbol,ps,codeword,length(inseq)) function acode = arithencode(symbol,ps,inseq) %函數(shù) arithencode 對(duì) symbol 進(jìn)行算術(shù)編碼 high_range = []。 end low_range = [0 high_range(1:length(ps)1)]。 for i= 1:length(inseq) sbidx(i) = find(symbol == inseq(i))。high = 1。 range = highlow。 low = low+range*low_range(sbidx(i))。
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1