|Documentation||Build Status||Code Coverage|
This package provides a set of functions to deconvolve digital signals, like images or time series. This is written in Julia, a modern high-level, high-performance dynamic programming language designed for technical computing.
The latest version of
Deconvolution.jl is available for Julia 1.0 and later
versions, and can be installed with Julia built-in package
manager. In a Julia session, after
entering the package manager mode with
], run the command
pkg> add Deconvolution
Older versions are also available for Julia 0.4-0.7.
The complete manual of
Deconvolution.jl is available at
http://deconvolutionjl.readthedocs.io. It has more detailed explanation of the
methods used and the examples are complemented with pictures. You can also
download the PDF version of the manual from
Deconvolution.jl provides only one methd, but others will come in
wiener(input, signal, noise[, blurring])
The Wiener deconvolution attempts at reducing the noise in a digital signal by suppressing frequencies with low signal-to-noise ratio. The signal is assumed to be degraded by additive noise and a shift-invariant blurring function.
wiener function can be used to apply the Wiener deconvolution method to a
digital signal. The arguments are:
input: the digital signal
signal: the original signal (or a signal with a luckily similar power spectrum)
noise: the noise of the signal (or a noise with a luckily similar power spectrum)
blurring(optional argument): the blurring kernel
All arguments must be arrays, all with the same size, and all of them in the
time/space domain (they will be converted to the frequency domain internally
fft function). Argument
noise can be also a real number, in which
case a constant noise with that value will be assumed (this is a good
approximation in the case of
Here is an example of use of
wiener function to perform the Wiener
deconvolution of an image, degraded with a blurring function and an additive
using Images, TestImages, Deconvolution, FFTW, ImageView # Open the test image img = channelview(testimage("cameraman")) # Create the blurring kernel in frequency domain x = hcat(ntuple(x -> collect((1:512) .- 257), 512)...) k = 0.001 blurring_ft = @. exp(-k*(x ^ 2 + x ^ 2)^(5//6)) # Create additive noise noise = rand(Float64, size(img)) # Fourier transform of the blurred image, with additive noise blurred_img_ft = fftshift(blurring_ft) .* fft(img) .+ fft(noise) # Get the blurred image from its Fourier transform blurred_img = real(ifft(blurred_img_ft)) # Get the blurring kernel in the space domain blurring = ifft(fftshift(blurring_ft)) # Polish the image with Deconvolution deconvolution polished = wiener(blurred_img, img, noise, blurring) # Wiener deconvolution works also when you don't have the real image and noise, # that is the most common and useful case. This happens because the Wiener # filter only cares about the power spectrum of the signal and the noise, so you # don't need to have the exact signal and noise but something with a similar # power spectrum. img2 = channelview(testimage("livingroom")) # Load another image noise2 = rand(Float64, size(img)) # Create another additive noise # Polish the image with Deconvolution deconvolution polished2 = wiener(blurred_img, img2, noise2, blurring) # # Compare... # imshow(img) # ...the original image # imshow(blurred_img) # ...the blurred image # imshow(polished) # ...the polished image # imshow(polished2) # ...the second polished image
The package is developed at https://github.com/JuliaDSP/Deconvolution.jl. There you can submit bug reports, propose new deconvolution methods with pull requests, and make suggestions. If you would like to take over maintainership of the package in order to further improve it, please open an issue.
The ChangeLog of the package is available in NEWS.md file in top directory.
Deconvolution.jl package is licensed under the MIT "Expat" License. The
original author is Mosè Giordano.
7 days ago