【正文】
,如下編輯 M 文件, %表示注釋部分: clear。 每次畫圖前可用 figure 命令新開一個圖像窗口,否則前一次顯示的圖像會被新的圖像覆蓋。 Debug 菜單下還提供了設(shè)置斷 點 逐行執(zhí)行等調(diào)試命令。 在 Matlab mand window 中的命令在打回車后直接執(zhí)行。要了解更多關(guān)于 Matlab的基本知識,可看 Matlab help 下的 Matlab 目錄。變量名區(qū)分大小寫,如 a 和 A 表示兩個不同的變量。 2 圖像的輸入 基礎(chǔ)知識 Matlab 中基本變量都是以矩陣的形式保存的。 這個三維矩陣的第一維就是上圖中第一層代表紅色數(shù)值,第二維為第二層代表綠色數(shù)值,第三維 為第三層代表藍色數(shù)值。 RGB 圖像就是采用紅、綠、藍作為三原色的,其中 R 為紅色, G為綠色, B 為藍色。讀入 matlab 也是一個二維矩陣,二值圖像讀入 matlab 中也是一個二維的平面矩陣,但像素點取值只限于 0,1。灰度圖像讀入 matlab 中是一個二維的平面矩陣,其中行與列的乘積代表其圖片中像素點的個數(shù)。 灰度圖像一般看起來是一副黑白圖像,但是色彩明暗度較二值圖像更為豐富。色圖矩陣中, 每一行表示一種顏色,每行有三個數(shù)據(jù),分別表示該種顏色中紅、綠、藍的比例情況,所有元素值都在 [0, 1]內(nèi)。 matlab 幾種圖像類型 武漢理工大學《 MATLAB 原理與應(yīng)用》課程設(shè)計 2 MATLAB 支持五種圖像類型,即二值圖像、索引圖像、灰度圖像、 RGB 圖像和多幀圖像陣列。 ⒀ PGM( Portable Graymap)。 ⑾ RAS( Sun Raster image):有 1 位 bitmap、 8 位索引、 24 位真彩色和帶有透明度的 32 位真彩色。 ⑼ CUR( Windows Cursor resource):有 1 位、 4 位、 8 位非壓縮圖像。 ⑺ HDF( Hierarchial Data Format):有 8 位、 24 位光柵圖像數(shù)據(jù)集。 ⑸ PNG( Portable Network Graphics):包括 1 位、 2 位、 4 位、 8 位和 16 位灰度圖像, 8 位和 16 位索引圖像, 24 位和 48 位真彩色圖像。 ⑷ TIFF( Tagged Iamge File Format):處理 1 位、 4 位、 8 位、 24 位非壓縮圖像, 1 位、 4 位、 8 位、 24 位 packbit 壓縮圖像, 1 位 CCITT 壓縮圖像等。 ⑶ PCX( Windows Paintbrush):可處理 1 位、 4 位、 8 位、 16 位、 24 位等圖像數(shù)據(jù)。 ⑵ BMP( Windows Bitmap):有 1 位、 4 位、 8 位、 24 位非壓縮圖像, 8 位RLE( Run length Encoded)的圖像。 本次課程設(shè)計介就是 Matlab 環(huán)境下的一些最基本的圖像處理操作,如讀取、保存和顯示不同格式的圖像,并進行圖像格式的相互變換如索引圖像、灰度圖像、RGB 圖像和二值圖像的相互轉(zhuǎn)換 武漢理工大學《 MATLAB 原理與應(yīng)用》課程設(shè)計 II Abstract MATLAB is a scientific puting language that adds the function of numerical puting and graphics processing, symbols together. As a powerful scientific puting platforms, it can almost satisfy all the calculations that needs. MATLAB itself is a powerful tool of data visualization that can display data through various forms, such as graylevel histogram, contours, montage mixing, pixel analysis, the layer texture and transformation. With visual graphics, it can not only evaluate image characteristics, but also analyze the distribution of color image. The purpose of the practice of introducing Matlab environment is the most basic of some image processing operations, such as read, write, image information and image format, size and gray telescopic。 MATLAB 本身就是功能強大的數(shù)據(jù) 可視化工具,可以通過各種形式顯示分析數(shù)據(jù),例如灰度直方圖、等高線、蒙太奇混合、像素分析、圖層變換以及材質(zhì)貼圖等。 時間安排: 序 號 階段內(nèi)容 所需時間 1 方案設(shè)計 2 天 2 軟件設(shè)計 3 天 3 系統(tǒng)調(diào)試 2 天 4 答辯 1 天 合 計 8 天 指導教師簽名: