【正文】
圖 3 原圖與灰白圖 查看圖像的屬性 Matlab 中可以使用 imfinfo 函數(shù)查看文件信息,圖像的查看及讀寫。png39。meter39。 mean2(g) 上面的程序同樣也是在新建的 MFile 文件里面編寫運行的,檢查程序沒有錯誤之后,就可以在 mand window 窗口直接運行。39。)。 g=rgb2gray(i)。 imhist(g)。快速傅里葉變換雖然沒有對傅氏變換理論做一步補充,但是對于在計算機系統(tǒng)或者說數(shù)字系統(tǒng)中應用離散傅里葉變換,可以說是進了一大步。 FFT=fft2(double(g))。 《基礎強化訓練》報告 13 打開 matlab 后將本程序段直接復制到 matlab 的 “ mand window” 里面的 “ ” 后即可進行圖片的傅立葉變換 。 經過這次基礎強化訓練, 也反映出了在之前學習中的諸多不足之處。使我在數(shù)學基礎知識,基礎能力方面得到了提升,另外使我較為全面的了解了常用的數(shù)據(jù)分析與處理原理及方法,并通過 MATLAB 軟件進行了模擬分析;也使我進一步提高了自己的文獻檢索與文獻閱讀能力,同時也鍛煉了我的論文撰寫能力。如下圖示: 圖 9 快速傅里葉變換與反變換結果 運行結果中第一幅圖為原始的灰度圖像,第二幅為變換后的 FFT 頻譜圖,第三幅為傅里葉反變換圖,第四幅為快速傅里葉變換圖。 %把快速傅里葉變換的 DC 組件移到光譜中心 IFFT=ifft2(FFTS)。 這里是對圖像快速傅里葉變化,用到的是 fft2 函數(shù)。huibaizhifangtu39。運行結果如下: 圖 7 方差的結果顯示 灰度直方圖 直方圖是一個顯示灰度或索引圖像亮度分布情況的圖表,它是圖像分析中用來說明圖像灰度分布的圖形。 h=double(g)。 g=rgb2gray(i)。上圖程序運行的結果如下圖 6 所示。 使用 rgb2gray 函數(shù)轉換為灰度圖后,最后結果保存在一個 unit8( 8 位)矩陣中,由于此矩陣為 415*311 大小,限于篇幅只截取 其中一部分如圖所示,每個單元的數(shù)值就是原來圖像中對應的灰度值。truecolor39。函數(shù)調用格式為: info=imfinfo( filename, fmt) info=imfinfo( filename) 參數(shù) fmt 對應于所有圖像處理工具中所有支持的圖像文件格式。 figure imshow(g)。具體指令如下: i=imread(39。 m 文件的好處在于它可以保存命令,還可以輕易地修改《基礎強化訓練》報告 4 命令而無需敲入整個命令行。 《基礎強化訓練》報告 2 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。 查看圖像的屬性 ....................................................................................... 5 灰度值的獲取 ..............