Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
pmi432 / LR07 / 2read / image processing toolbox guide.pdf
Скачиваний:
166
Добавлен:
18.03.2015
Размер:
18.08 Mб
Скачать

Deblurring with a Regularized Filter

Deblurring with a Regularized Filter

Use the deconvreg function to deblur an image using a regularized filter. A regularized filter can be used effectively when limited information is known about the additive noise.

To illustrate, this example simulates a blurred image by convolving a Gaussian filter PSF with an image (using imfilter). Additive noise in the image is simulated by adding Gaussian noise of variance V to the blurred image (using imnoise):

1Read an image into the MATLAB workspace. The example uses cropping to reduce the size of the image to be deblurred. This is not a required step in deblurring operations.

I = imread('tissue.png');

I = I(125+[1:256],1:256,:); figure, imshow(I) title('Original Image')

Image Courtesy Alan W. Partin

2Create the PSF.

PSF = fspecial('gaussian',11,5);

3Create a simulated blur in the image and add noise.

Blurred = imfilter(I,PSF,'conv');

13-7

13 Image Deblurring

V = .02;

BlurredNoisy = imnoise(Blurred,'gaussian',0,V); figure, imshow(BlurredNoisy)

title('Blurred and Noisy Image')

4Use deconvreg to deblur the image, specifying the PSF used to create the blur and the noise power, NP.

NP = V*prod(size(I));

[reg1 LAGRA] = deconvreg(BlurredNoisy,PSF,NP); figure,imshow(reg1)

title('Restored Image')

Refining the Result

You can affect the deconvolution results by providing values for the optional arguments supported by the deconvreg function. Using these arguments you can specify the noise power value, the range over which deconvreg should

13-8

Deblurring with a Regularized Filter

iterate as it converges on the optimal solution, and the regularization operator to constrain the deconvolution. To see the impact of these optional arguments, view the Image Processing Toolbox deblurring examples.

13-9

Соседние файлы в папке 2read