s1081428 作業三

主題

    撰寫傅利葉轉換程式(Forward Fourier Transform and Inverse Fourier Transform)將一張圖
    像轉換至頻域後,將頻譜大小與相位角度各以灰階 256 色圖像方式呈現出,再呈現還
    原後圖像。

開發環境

    ubuntu 22.04 + Opencv-python 4.7.0 in Visual Studio code

程式說明


 
   DFT
        cv2.dft()
            Discrete Fourier transform
        np.fft.fftshift()
            Shift the zero-frequency component to the center of the spectrum
        cv2.cartToPolar 
            returns both magnitude and phase in a single shot
 
    IDFT 
        np.fft.iffshift()
            The inverse of fftshift
    cv2.idft()
            Calculates the inverse Discrete Fourier Transform
        cv2.maganitude()
            Calculates the magnitude 
   





參考資源

    DFT

留言

這個網誌中的熱門文章

rzwang Homework #1

s1093350 Homework #2

s1081444 Homework #7