Image Quality Problem for a Restored Image
Afficher commentaires plus anciens
Hi.
I add gaussian noise for an image in order to calculate image quality between the original and restored image that restored by using window depend on center pixel.
clc
clear all
close all
Original_Image = imread('4.jpg');
Original_Image_Double = im2double(Original_Image);
Noisy_Image = imnoise(Original_Image_Double, 'gaussian', 0, 0.01);
Noise_R = Original_Image_Double(:,:,1);
Noise_G = Original_Image_Double(:,:,2);
Noise_B = Original_Image_Double(:,:,3);
Kernel = [0 0 0;0 1 0;0 0 0];
New_R = conv2((Noise_R), Kernel, 'same');
New_G = conv2((Noise_G), Kernel, 'same');
New_B = conv2((Noise_B), Kernel, 'same');
New_Image = cat(3, New_R, New_G, New_B);
montage({Original_Image, Noisy_Image, New_Image})
Image_Quality = psnr(New_Image, Original_Image_Double)
But when I run the code I get (infinity) for image quality
Image_Quality =
Inf
Why I get this, is ther any problen, can any one help pleas
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Image Quality dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!