scipy.signal.wiener 始终显示警告
scipy.signal.wiener always show warning
我正在尝试在灰度图像中使用 Scipy 的维纳降噪函数:
image = data.imread(image_path, as_grey=True)
image = signal.wiener(image)
但我总是收到此警告:
/usr/lib/python2.7/dist-packages/scipy/signal/signaltools.py:425: RuntimeWarning: divide by zero encountered in true_divide
res *= (1 - noise / lVar)
/usr/lib/python2.7/dist-packages/scipy/signal/signaltools.py:425: RuntimeWarning: invalid value encountered in multiply
res *= (1 - noise / lVar)
过滤器工作正常,但为什么我会收到此警告?
尝试将输入图像的数据类型转换为float32或float64,即:
image = image.astype('float64')
image = signal.wiener(image)
我猜我们将 "divided by zero" 反驳为下溢数。
我正在尝试在灰度图像中使用 Scipy 的维纳降噪函数:
image = data.imread(image_path, as_grey=True)
image = signal.wiener(image)
但我总是收到此警告:
/usr/lib/python2.7/dist-packages/scipy/signal/signaltools.py:425: RuntimeWarning: divide by zero encountered in true_divide
res *= (1 - noise / lVar)
/usr/lib/python2.7/dist-packages/scipy/signal/signaltools.py:425: RuntimeWarning: invalid value encountered in multiply
res *= (1 - noise / lVar)
过滤器工作正常,但为什么我会收到此警告?
尝试将输入图像的数据类型转换为float32或float64,即:
image = image.astype('float64')
image = signal.wiener(image)
我猜我们将 "divided by zero" 反驳为下溢数。