【正文】
摘要I摘 要本文介紹了基于 MATLAB 的 JPEG 基本系統(tǒng)編碼。在圖像傳送過程中,經(jīng)常采用JPEG 格式對(duì)靜止圖像進(jìn)行壓縮編碼。JPEG 基本系統(tǒng)編碼首先把灰度圖像分成 88 的像素塊,然后對(duì)各個(gè)像素塊進(jìn)行離散余弦變換得到變換系數(shù)后再進(jìn)行量化。其次,對(duì)量化后的變換系數(shù)采用 Z 形掃描,得到直流系數(shù)和交流系數(shù)。接著,對(duì)直流系數(shù)采用預(yù)測(cè)編碼,對(duì)交流系數(shù)采用可變長(zhǎng)編碼。最后,根據(jù)標(biāo)準(zhǔn)的 Huffman 編碼進(jìn)行熵編碼,輸出壓縮圖像的比特序列,從而實(shí)現(xiàn)圖像壓縮。在接收端,經(jīng)過 Huffman 解碼、直流系數(shù)和交流系數(shù)可變長(zhǎng)解碼以及反量化后,再進(jìn)行離散余弦逆變換后得到重建圖像。MATLAB 仿真結(jié)果表明:重建圖像與原始圖像幾乎沒有任何差異,能夠滿足人們的視覺需求。另外,數(shù)據(jù)壓縮比在 10 倍左右且峰值信噪比均在 30dB 以上。因此,采用MATLAB 實(shí)現(xiàn) JPEG 基本系統(tǒng)編碼具有方法簡(jiǎn)單、速度快、誤差小等優(yōu)點(diǎn),能夠大大提高圖像壓縮的效率和精度。關(guān)鍵詞:JPEG;離散余弦變換; MATLAB;圖形用戶界面AbstractIIABSTRACTThe JPEG basic system coding based on MATLAB is introduced in this paper. The JPEG format is usually used to press static image during the process of image transmission.The JPEG basic system coding divides the gray image into several subimages of size 88 firstly. Discrete cosine transform is used to get the transform coefficient of subimage and then the transform coefficient is quantized. Secondly, Z type scan is adopted to get direct current (DC) coefficient and alternate current (AC) coefficient of the quantized transform coefficient. Thirdly, predictive coding and variablelength coding is used for DC and AC coefficient respectively. Finally, bit sequences of the pressed image are outputted by using entropy coding according to standard Huffman coding. Then image pression is realized. The user gets the reconstructed image by Huffman decoding, variablelength decoding of DC and AC coefficient, dequantization and reverse discrete cosine transform sequentially.MATLAB results of simulation demonstrate that there is no difference between reconstructed image and original image and reconstructed image can satisfy human visual requirements. Additionally, pression ratio is about 10 and peak signaltonoise ratio is all over than 30dB. Therefore, the realization of JPEG basic system coding using MATLAB is of such advantages as simple method, fast speed, small error and it can enhance the efficiency and accuracy of image pression greatly. Key words: JPEG。 discrete cosine transform。 MATLAB。 graphical user interface目錄i目 錄第 1 章 緒 論 .........................................................................................................1 圖像變換編碼概述及目前狀況 ...........................................................................................1 論文結(jié)構(gòu) ...............................................................................................................................2第 2 章 MATLAB 簡(jiǎn)介 ...........................................................................................3 MATLAB 的發(fā)展簡(jiǎn)史 ..........................................................................................................3 MATLAB 的特點(diǎn) ..................................................................................................................3 MATLAB 的功能 .................................................................................................................................3 MATLAB 的技術(shù)特點(diǎn) .........................................................................................................................4 MATLAB 圖像類型 ..............................................................................................................5 GUI.........................................................................................................................................5第 3 章 變換編碼 .....................................................................................................7 變換編碼的一般形式與意義 ...............................................................................................7 基本原理 ...............................................................................................................................7 正交變換的去相關(guān)性..........................................................................................................................8 變換編碼性能判斷..............................................................................................................................9 變換編碼的特點(diǎn)................................................................................................................................11 最佳正交變換—— KL 變換 ..............................................................................................11第 4 章 JPEG 圖像壓縮 .........................................................................................13 JPEG 概述 ............................................................................................................................13 JPEG 圖像編碼算法的實(shí)現(xiàn) ................................................................................................14 離散余弦編碼.....................................................................................................................................14 量化....................................................................................................................................................15 編碼.....................................................................................................................................................16 JPEG 圖像數(shù)據(jù)壓縮發(fā)展 ..................................................................................................................19第 5 章 MATLAB 仿真 .........................................................................................21 系統(tǒng)模塊圖 .........................................................................................................................21 JPEG 壓縮編碼的設(shè)計(jì)流程 ................................................................................................21目錄ii 掃描順序變換....................................................................................................................................22 量化部分程序流程圖........................................................................................................................22 霍夫曼編碼部分程序流程圖............................................................................................................22 圖形用戶界面設(shè)計(jì) ....