Borrar filtros
Borrar filtros

Needed Full code for Color to grayscale and Wiener Algorithm for deblurring and differences between Original and Final Deblurred

1 visualización (últimos 30 días)
Needed Full code for Color to grayscale and Wiener Algorithm for deblurring and differences between Original and Final Deblurred
% Load the original image
Ioriginal = imread('greyface1.jpg');
imshow(Ioriginal);
title('Original Image');
% Define the motion blur point spread function (PSF)
PSF = fspecial('motion', 21, 11);
% Convert the original image to double
Ioriginal = im2double(Ioriginal);
% Apply motion blur to the original image
blurred = imfilter(Ioriginal, PSF, 'conv', 'circular');
imshow(blurred);
title('Blurred Image');
% Restore the blurred image without noise
wnr1 = deconvwnr(blurred, PSF);
% Calculate the absolute differences between the original and restored images
err = imabsdiff(Ioriginal, wnr1);
% Display the restored image
imshow(wnr1);
title('Restored Blurred Image');
% Create a histogram of the absolute differences
figure;
histogram(err);
title('Histogram of Absolute Differences');
  6 comentarios
Kartikeya
Kartikeya el 13 de Nov. de 2023
@DGM Like suppose if i take original image and final output how much difference happened by pixel by pixel i want to get

Iniciar sesión para comentar.

Respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by