0% found this document useful (0 votes)
40 views3 pages

Compte Rendu: Elaboré Par: Classe: Exemple

This document summarizes an example of using the Wiener filter on Matlab to restore an image blurred by motion. It reads in an original pristine image, simulates motion blur on the image by convolving it with a point spread function, and then restores the blurred image using the deconvwnr function without noise. The key steps are: 1) Read in an original image, 2) Simulate motion blur by convolving the image with a point spread function, 3) Restore the blurred image using deconvwnr without noise.

Uploaded by

Houssem Brini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views3 pages

Compte Rendu: Elaboré Par: Classe: Exemple

This document summarizes an example of using the Wiener filter on Matlab to restore an image blurred by motion. It reads in an original pristine image, simulates motion blur on the image by convolving it with a point spread function, and then restores the blurred image using the deconvwnr function without noise. The key steps are: 1) Read in an original image, 2) Simulate motion blur by convolving the image with a point spread function, 3) Restore the blurred image using deconvwnr without noise.

Uploaded by

Houssem Brini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Compte rendu

Elaboré par : Brini Houssem


Eddine
Classe : 3éme électromécanique

Exemple  : Wiener Filter sur


Matlab
Read Pristine Image
Read and display a pristine image that does not have blur or noise.
 Ioriginal = imread ('cameraman.tif') ;
 Imshow (Ioriginal)
 Title ('Original Image')

Simulate and Restore Motion Blur Without Noise


Simulate a blurred image that might result from camera motion. First, create a
point-spread function, PSF, by using the fspecial function and specifying linear
motion across 21 pixels at an angle of 11 degrees. Then, convolve the point-
spread function with the image by using imfilter.
The original image has data type uint8. If you pass a uint8 image to imfilter,
then the function will quantize the output in order to return another uint8 image.
To reduce quantization errors, convert the image to double before
calling imfilter.
PSF = fspecial ('motion',21,11) ;
Idouble = im2double (Ioriginal) ;
blurred = imfilter (Idouble,PSF,'conv','circular');
imshow (blurred)
title ('Blurred Image')
Restore the blurred image by using the deconvwnr function. The blurred image
does not have noise so you can omit the noise-to-signal (NSR) input argument.
wnr1 = deconvwnr(blurred,PSF);
imshow (wnr1)
title ('Restored Blurred Image')

You might also like