[PYTHON] Image blur removal

Sparse modeling Chapter 10 Image defocusing: Implemented a practical example. Link to Jupyter notebook on GitHub

result

The image was blurred and noise was added. Blurring was corrected by the iterative reduction method.

Image size: $ 256 \ times 256 $ Blurred kernel: $ \ frac {1} {i ^ {2} + j ^ {2} + 1} (-7 \ leq i, j \ leq 7) $) Noise level: $ \ sigma ^ {2} = 2 $

deblurring.png

SSF is the algorithm name. SSF-LS adds a straight line search, and SSF-SESOP-5 adds sequential subspace optimization (using gradients up to 5 previous). The number is the peak signal to noise ratio (PSNR) [db].

algorithm

Separable surrogate functional (SSF)

\mathbf{x_{\rm{k+1}}} = S_{\rho, \lambda / c} (\mathbf{x_\rm{k}} + \frac{1}{c}\mathbf{A^{\rm{T}}}\mathbf{H^{\rm{T}}}(\mathbf{\tilde{y}}-\mathbf{H}\mathbf{A}\mathbf{x_{\rm{k}}})

$ \ mathbf {H} $ is a blurred kernel. $ \ mathbf {A ^ {T}} $ is a level 2 (non-reduced) wavelet transform. $ \ mathbf {\ tilde {y}} $ is a blurred image. $ \ mathbf {x} $ is the wavelet coefficient. $ S_ {\ rho, \ lambda / c} $ is a reduction operator. $ c $ is a normalization constant ($ c = 1 $).

Example of level 2 (non-reduced) wavelet transform

wavelet.png

Shrink

Smoothed the L1 norm\rho(x)=|x|+s\log(1+|x|/s)soxWhen measuring the size of (s=0.01),S_{\rho, \lambda / c}Can be obtained analytically. Lagrange multiplier\lambda=0.075And said. $ x_{opt}=\frac{(x_{0} - s - \lambda )+\sqrt{(s+\lambda-x_{0})^{2}+4 s x_{0}}}{2} $

reference

Written by Michael Elad, Translated by Toru Tamaki, Sparse Modeling, Kyoritsu Shuppan, Chapter 10

Recommended Posts

Image blur removal
Image denoising
Image recognition
Image crawler