0
点赞
收藏
分享

微信扫一扫

灰度图像转换为频域图像

梦为马 2022-04-05 阅读 71
python
    img = nb.load(os.path.join(rootName,filename)).get_fdata()
    f = np.fft.fft2(img)
    fshift = np.fft.fftshift(f)
    # 这里构建振幅图的公式,一个y轴对称在正向递增的变换
    magnitude_spectrum = 20 * np.log(np.abs(fshift))
举报

相关推荐

0 条评论