1 / 47

TB-058

TB-058. 儒林圖書公司 印行. 第五章:頻率領域影像處理. 5.1  簡介 5.2  快速傅立葉轉換 5.3  影像傅立葉轉換 5.4  頻域濾波器 5.5  程式發展 5.6  實作練習 5.7  程式分析 5.8  測驗題. 5.1. 簡介. 5.2. 快速傅立葉轉換. ······(5.7). ······(5.8). ··············(5.9). ··········································(5.10).

Download Presentation

TB-058

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TB-058 儒林圖書公司 印行 第五章:頻率領域影像處理

  2. 第五章:頻率領域影像處理 • 5.1 簡介 • 5.2 快速傅立葉轉換 • 5.3 影像傅立葉轉換 • 5.4 頻域濾波器 • 5.5 程式發展 • 5.6 實作練習 • 5.7 程式分析 • 5.8 測驗題 第五章:頻率領域影像處理

  3. 5.1 簡介 第五章:頻率領域影像處理

  4. 第五章:頻率領域影像處理

  5. 5.2 快速傅立葉轉換 ······(5.7) ······(5.8) 第五章:頻率領域影像處理

  6. ··············(5.9) ··········································(5.10) ·········································(5.11) ·····················(5.12) 第五章:頻率領域影像處理

  7. 第五章:頻率領域影像處理

  8. 第五章:頻率領域影像處理

  9. 第五章:頻率領域影像處理

  10. 第五章:頻率領域影像處理

  11. 【運算個數】 ······························(5.13) 第五章:頻率領域影像處理

  12. 【簡化】 ·····································(5.14) ·····································(5.15) 第五章:頻率領域影像處理

  13. 第五章:頻率領域影像處理

  14. 第五章:頻率領域影像處理

  15. 第五章:頻率領域影像處理

  16. ·········································(5.16)·········································(5.16) ·········································(5.17) ·········································(5.18) 第五章:頻率領域影像處理

  17. 5.3 影像傅立葉轉換 ·········(5.19) ··································(5.20) 第五章:頻率領域影像處理

  18. 二維傅立葉轉換的性質 (1) 週期性 (2) 對稱性 (3) 直流成份 (4) 頻譜顯示 (5) 變數分離 第五章:頻率領域影像處理

  19. 第五章:頻率領域影像處理

  20. ··········(5.21) ···(5.22) ··················(5.23) ·················································(5.24) 第五章:頻率領域影像處理

  21. 第五章:頻率領域影像處理

  22. 第五章:頻率領域影像處理

  23. 第五章:頻率領域影像處理

  24. ································(5.25)································(5.25) ·················································(5.26) ···(5.27) ·········(5.28) 第五章:頻率領域影像處理

  25. 第五章:頻率領域影像處理

  26. 第五章:頻率領域影像處理

  27. 5.4 頻域濾波器 ·····················(5.29) 第五章:頻率領域影像處理

  28. ·······························(5.30)·······························(5.30) ·······························(5.31) 第五章:頻率領域影像處理

  29. 第五章:頻率領域影像處理

  30. ··························(5.32) 第五章:頻率領域影像處理

  31. 第五章:頻率領域影像處理

  32. ·······················(5.33) ·············(5.34) ············(5.35) 第五章:頻率領域影像處理

  33. ··············(5.36) ·································(5.37) 第五章:頻率領域影像處理

  34. 第五章:頻率領域影像處理

  35. ·······················(5.38) 第五章:頻率領域影像處理

  36. 第五章:頻率領域影像處理

  37. 第五章:頻率領域影像處理

  38. 第五章:頻率領域影像處理

  39. 第五章:頻率領域影像處理

  40. 第五章:頻率領域影像處理

  41.  圖5-23 頻域影像處理範例 第五章:頻率領域影像處理

  42.  圖5-23 頻域影像處理範例 (續) 第五章:頻率領域影像處理

  43. 5.5 程式發展 這一章包含 4 個副程式,分別說明如下: Void Char2 Complex (COMPLEX*F,n) 將以 (OFFSETX,OFFSETY) 為起始點的 n*n 影像轉換為複數矩陣,COMPEX 為自訂複數結構。 Void-1DFFT (COMPLEX*F,int log2n,int n,int ntype) 執行一維正反快速傅立葉轉換。 Void-2DFFT (COMPLEX*F,int n,int log2n,int ntype) 執行 n*n 二維正反傅立葉轉換。 第五章:頻率領域影像處理

  44. 【範例1】: test5-1.c #include "image.lib"main(){ struct COMPLEX F[64*64]; int i,j, n=64, log2n=6; char str[40]; printf("\n ** PLS. INPUT THE NAME OF IMAGE FILE :"); gets(str); Setvga256(); Inipalette(); Loadimage(str); Sinwave_Noise(16,16,0); getch(); Char2Complex(F,n); _2Dfft(F,n,log2n,0); /* forward FFT */ Spectrum(F,n,0); getch(); _2Dfft(F,n,log2n,1); /* Inverse FFT */ Spectrum(F,n,1); getch(); Settext();} 第五章:頻率領域影像處理

  45. 第五章:頻率領域影像處理

  46. 5.7 程式分析 void Char2Complex (struct COMPLEX *f, int n){ int i,j; for (j=0; j<n; j++) for (i=0; i<n; i++) { f[j*n+i].r=Getpixel (OFFSETX+i, OFFSETY+j); f[j*n+i].i=0; }}void Spectrum(struct COMPLEX *f, int n, int type){ int i,j; float frequency, avg=0.; for (j=0; j<n; j++) for (i=0; i<n; i++) { if (type == 0) { frequency = logl0(1 + sqrt( (f[j*n+i].r * f[j*n+i].r) +(f[j*n+i].i * f[j*n+i].i))); if ((j == 0) && (i == 0)) avg=255./frequency; Putpixel(OFFSETX+(i+(n/2))%n,OFFSETY+(j+(n/2))%n, (char)avg*fr equency); } else Putpixel(OFFSETX+i, OFFSETY+j, (char) f[j*n+i].r); }} (1) 圖5-25 二維傅立葉轉換副程式 第五章:頻率領域影像處理

  47. void _2Dfft (struct COHPLEX *F, int n, int log2n, int ntype){ int i, j; struct COMPLEX temp[64]; /* the maximum size is 64*64 */ for (i=0; i<n; i++) _1Dfft(F+n*i, log2n, n, ntype); for (i=0; i<n; i++) { for (j=0; j<n; j++) temp[j]=F[j*n+i]; _1Dfft (temp, log2n, n, ntype); for (j=0; j<n; j++) F[j*n+i] = temp[j]; }} (2) (3) 圖5-25 二維傅立葉轉換副程式(續) 第五章:頻率領域影像處理

More Related