Image Quality Problem for a Restored Image

조회 수: 9 (최근 30일)
Mohammed Abdul Wadood
Mohammed Abdul Wadood 2022년 5월 15일
댓글: Mohammed Abdul Wadood 2022년 5월 16일
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

채택된 답변

Image Analyst
Image Analyst 2022년 5월 15일
편집: Image Analyst 2022년 5월 15일
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.
  댓글 수: 1
Mohammed Abdul Wadood
Mohammed Abdul Wadood 2022년 5월 16일
Thank you so much @Image Analyst, It's good advice have a notes I didn't know about. And I will try (brisque or niqe) in my code above

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by