【发布时间】:2020-08-24 14:57:47
【问题描述】:
我正在尝试在由 RGB 图像组成的 CIFAR10 数据集上实现维纳过滤器。
但是这个滤镜只能用于灰度图像。
我尝试在每个 R/G/B 通道上实现它,然后将它们组合起来,但生成的 RGB 图像甚至没有接近初始图像。
有什么想法吗?
(我正在使用 scipy.signal.signaltools.wiener)
提前致谢
【问题讨论】:
标签: python scipy wiener-filter
我正在尝试在由 RGB 图像组成的 CIFAR10 数据集上实现维纳过滤器。
但是这个滤镜只能用于灰度图像。
我尝试在每个 R/G/B 通道上实现它,然后将它们组合起来,但生成的 RGB 图像甚至没有接近初始图像。
有什么想法吗?
(我正在使用 scipy.signal.signaltools.wiener)
提前致谢
【问题讨论】:
标签: python scipy wiener-filter
好的,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)
【讨论】: