import cv2
import numpy as np
import matplotlib.pyplot as plt
# DFT hyper-parameters
K, L = 128, 128
channel = 3
# DFT
def dft(img):
H, W, _ = img.shape
# Prepare DFT coefficient
G = np.zeros((L, K, channel), dtype=np.complex)
# prepare processed index corresponding to original image positions
x = np.tile(np.arange(W), (H, 1))
y = np.arange(H).repeat(W).reshape(H, -1
opencv打卡32: 傅立叶变换(Fourier Transform)
最新推荐文章于 2022-05-07 11:23:22 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)