Main Content

deconvreg

Deblur image using regularized filter

Description

example

J= deconvreg(I,psf)Deconvolves图像Iusing the regularized filter algorithm, returning deblurred imageJ。The assumption is that the imageIwas created by convolving a true image with a point-spread function (PSF),psf, and possibly by adding noise. The algorithm is a constrained optimum in the sense of least square error between the estimated and the true images under requirement of preserving image smoothness.

J= deconvreg(I,psf,NP)specifies the additive noise power,NP

J= deconvreg(I,psf,NP,lrange)specifies the range,lrange, where the search for the optimal solution is performed. The algorithm finds an optimal Lagrange multiplierlagrawithin thelrangerange.

J= deconvreg(I,psf,NP,lrange,regop)constrains the deconvolution using regularization operatorregop。默认的正则操作员是Laplacian操作员,以保持图像平滑度。

[J,lagra] = deconvreg(___)输出Lagrange乘数的值,lagrain addition to the restored image,J

Examples

collapse all

Create sample image.

I = checkerboard(8);

创建PSF并使用它来创建输入图像的模糊且嘈杂的版本。

PSF = fspecial('gaussian',7,10); V = .01; BlurredNoisy = imnoise(imfilter(I,PSF),'gaussian',0,V); NOISEPOWER = V*prod(size(I));

Deblur the image.

[J LAGRA] = deconvreg(BlurredNoisy,PSF,NOISEPOWER);

Display the various versions of the image.

subplot(221); imshow(BlurredNoisy); title('A = Blurred and Noisy'); subplot(222); imshow(J); title('[J LAGRA] = deconvreg(A,PSF,NP)'); subplot(223); imshow(deconvreg(BlurredNoisy,PSF,[],LAGRA/10)); title(“deconvreg(A,PSF,[],0.1*LAGRA)'); subplot(224); imshow(deconvreg(BlurredNoisy,PSF,[],LAGRA*10)); title(“deconvreg(A,PSF,[],10*LAGRA)');

图包含4个轴对象。轴对象1带标题a =模糊,嘈杂的对象包含一个类型图像的对象。轴对象2带标题[J lagra] = deconvreg(a,psf,np)包含一个类型图像的对象。轴对象3具有标题deconvreg(a,psf,[],0.1*lagra)包含一个类型图像的对象。轴对象4带标题deconvreg(a,psf,[],10*lagra)包含一个类型图像的对象。

Input Arguments

collapse all

Blurry image, specified as a numeric array of any dimension.

Data Types:single|double|INT16|uint8|uint16

PSF,指定为数字阵列。

Data Types:double

噪声力量, specified as a numeric scalar.

Data Types:double

Search range, specified as a numeric scalar or a 2-element numeric vector. Iflrangeis a scalar, then the algorithm assumes thatlagrais equal tolrange。如果指定lagra, then the function ignores theNP价值

Data Types:double

Regularization operator, specified as a numeric array. Theregoparray dimensions must not exceed the dimensions of the image,I。任何非单词尺寸都必须对应于psf

Data Types:double

Output Arguments

collapse all

Deblurred image, returned as a numeric array.J具有与I

Lagrange multiplier, returned as a numeric scalar.

Tips

  • The output imageJcould exhibit ringing introduced by the discrete Fourier transform used in the algorithm. To reduce the ringing, useI = edgetaper(I,psf)before callingdeconvreg

参考

[1]Gonzalez, R. C., and R. E. Woods.Digital Image Processing。Addison-Wesley Publishing Company, Inc., 1992.

Version History

在R2006a之前引入