【问题标题】:Wiener filtering on RGB image对 RGB 图像进行维纳滤波
【发布时间】:2020-08-24 14:57:47
【问题描述】:

我正在尝试在由 RGB 图像组成的 CIFAR10 数据集上实现维纳过滤器。

但是这个滤镜只能用于灰度图像。

我尝试在每个 R/G/B 通道上实现它,然后将它们组合起来,但生成的 RGB 图像甚至没有接近初始图像。

有什么想法吗?

(我正在使用 scipy.signal.signaltools.wiener)

提前致谢

【问题讨论】:

    标签: python scipy wiener-filter


    【解决方案1】:

    好的,skimage (scikit-image) 怎么样?看看这里: https://scikit-image.org/docs/dev/api/skimage.restoration.html#skimage.restoration.wiener

    在 rgb 图像上给出的示例如下:

    from skimage import color, data, restoration
    img = color.rgb2gray(data.astronaut())
    from scipy.signal import convolve2d
    psf = np.ones((5, 5)) / 25
    img = convolve2d(img, psf, 'same')
    img += 0.1 * img.std() * np.random.standard_normal(img.shape)
    deconvolved_img = restoration.wiener(img, psf, 1100)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-05-13
      • 1970-01-01
      • 2014-12-06
      • 1970-01-01
      • 2014-03-22
      • 2016-03-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多