Image Quality Problem for a Restored Image
    3 views (last 30 days)
  
       Show older comments
    
    Mohammed Abdul Wadood
 on 15 May 2022
  
    
    
    
    
    Commented: Mohammed Abdul Wadood
 on 16 May 2022
            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
0 Comments
Accepted Answer
  Image Analyst
      
      
 on 15 May 2022
        
      Edited: Image Analyst
      
      
 on 15 May 2022
  
      If the psnr is infinite comparing the original, no-noise image with the repaired image, then it means you have perfect noise removal and your new image is identical to your original.  But normally in denoising situations you have only the noisy input image and the denoised output image so that is what you should compare to see how different they are.  You should compare your new image against your noisy image, not your original.  But I wouldn't even use psnr.  It's meant for comparing things like compression where you have an original, then a compression/decompression round trip, and an output image.  In that case you'd want to compare the output to the original.  In the case of just checking the image quality of an image you might want to use brisque or niqe.  Your output images should have a better number than the input if your denoising algorithm worked.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
