视频去模糊 python_用scikitimag去除图像的模糊

import numpy as np

from scipy.misc import imread

from skimage import color, data, restoration

from scipy.signal import convolve2d as conv2

def main():

image = imread("/Users/gsamaras/Downloads/boat.tif")

psf = np.ones((5, 5)) / 25

image = conv2(image, psf, 'same')

image += 0.1 * image.std() * np.random.standard_normal(image.shape)

deconvolved = restoration.wiener(image, psf, 0.00001)

print deconvolved

print image

if __name__ == "__main__":

main()

输出:[[ 1. -1. 1. ..., 1. -1. -1.]

[-1. -1. 1. ..., -1. 1. 1.]

[ 1. 1. 1. ..., 1. 1. 1.]

...,

[ 1. 1. 1. ..., 1. -1. 1.]

[ 1. 1. 1. ..., -1. 1. -1.]

[ 1. 1. 1. ..., -1. 1. 1.]]

[[ 62.73526298 77.84202199 94.1563234 ..., 85.12442365

69.80579057 48.74330501]

[ 74.79638704 101.6248559 143.09978769 ..., 100.07197414

94.34431216 59.72199141]

[ 96.41589893 132.53865314 161.8286996 ..., 137.17602535

117.72691238 80.38638741]

...,

[ 82.87641732 122.23168689 146.14129645 ..., 102.01214025

75.03217549 59.78417916]

[ 74.25240964 100.64285679 127.38475015 ..., 88.04694654

66.34568789 46.72457454]

[ 42.53382524 79.48377311 88.65000364 ..., 50.84624022

36.45044106 33.22771889]]

我尝试了几种价值观。我错过了什么?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值