You are here : matlab → Image Processing → deconvblind
# deconvblind() - Image Processing

### Syntax

### Example

### Output / Return Value

### Limitations

### Alternatives / See Also

### Reference

[J,PSF] = deconvblind(I, INITPSF) deconvolves image I using the maximum likelihood algorithm, returning both the deblurred image J and a restored point-spread function PSF. The restored PSF is a positive array that is the same size as INITPSF, normalized so its sum adds up to 1. The PSF restoration is affected strongly by the size of the initial guess INITPSF and less by the values it contains. For this reason, specify an array of 1's as your INITPSF.I can be an N-dimensional array. To improve the restoration, deconvblind supports several optional parameters, described below. Use [] as a placeholder if you do not specify an intermediate parameter.[J,PSF] = deconvblind(I, INITPSF, NUMIT) specifies the number of iterations (default is 10). [J,PSF] = deconvblind(I, INITPSF, NUMIT, DAMPAR) specifies the threshold deviation of the resulting image from the input image I (in terms of the standard deviation of Poisson noise) below which damping occurs. The iterations are suppressed for the pixels that deviate within the DAMPAR value from their original value. This suppresses the noise generation in such pixels, preserving necessary image details elsewhere. The default value is 0 (no damping).[J,PSF] = deconvblind(I, INITPSF, NUMIT, DAMPAR, WEIGHT) specifies which pixels in the input image I are considered in the restoration. By default, WEIGHT is a unit array, the same size as the input image. You can assign a value between 0.0 and 1.0 to elements in the WEIGHT array. The value of an element in the WEIGHT array determines how much the pixel at the corresponding position in the input image is considered. For example, to exclude a pixel from consideration, assign it a value of 0 in the WEIGHT array. You can adjust the weight value assigned to each pixel according to the amount of flat-field correction.[J,PSF] = deconvblind(I, INITPSF, NUMIT, DAMPAR, WEIGHT, READOUT), where READOUT is an array (or a value) corresponding to the additive noise (e.g., background, foreground noise) and the variance of the read-out camera noise. READOUT has to be in the units of the image. The default value is 0.[J,PSF] = deconvblind(..., FUN, P1, P2,...,PN), where FUN is a function describing additional constraints on the PSF. FUN must be a function handle. FUN is called at the end of each iteration. FUN must accept the PSF as its first argument and can accept additional parameters P1, P2,..., PN. The FUN function should return one argument, PSF, that is the same size as the original PSF and that satisfies the positivity and normalization constraints. The function colfilt zero-pads A, if necessary. Note The output image J could exhibit ringing introduced by the discrete Fourier transform used in the algorithm. To reduce the ringing, use I = edgetaper(I,PSF) before calling deconvblind.

[J,PSF] = deconvblind(I, INITPSF)[J,PSF] = deconvblind(I, INITPSF, NUMIT)[J,PSF] = deconvblind(I, INITPSF, NUMIT, DAMPAR)[J,PSF] = deconvblind(I, INITPSF, NUMIT, DAMPAR, WEIGHT)[J,PSF] = deconvblind(I, INITPSF, NUMIT, DAMPAR, WEIGHT, READOUT)[J,PSF] = deconvblind(..., FUN, P1, P2,...,PN)

Deblur an Image Using Blind DeconvolutionOpen This Example Create a sample image with noise.% Set the random number generator back to its default settings for % consistency in results. rng default; I = checkerboard(8); PSF = fspecial('gaussian',7,10); V = .0001; BlurredNoisy = imnoise(imfilter(I,PSF),'gaussian',0,V); Create a weight array to specify which pixels are included in processing.WT = zeros(size(I)); WT(5:end-4,5:end-4) = 1; INITPSF = ones(size(PSF)); Perform blind deconvolution.[J P] = deconvblind(BlurredNoisy,INITPSF,20,10*sqrt(V),WT); Display the results.subplot(221);imshow(BlurredNoisy); title('A = Blurred and Noisy'); subplot(222);imshow(PSF,[]); title('True PSF'); subplot(223);imshow(J); title('Deblurred Image'); subplot(224);imshow(P,[]); title('Recovered PSF');