Wrong values of PSNR for two nearly identical images

1 回表示 (過去 30 日間)
mavicV
mavicV 2018 年 5 月 16 日
コメント済み: Walter Roberson 2018 年 5 月 17 日
Hello,
my original image is Lena.gif (256x256) which i attached and for this image i did a first level Wavelet (haar) decomposition with Wavelet analyzer toolbox, i attached approximation named LL1.
When i calculate PSNR with function in Matlab "psnr" i got values 27.68, which is not logically. Also, i computed PSNR with my own code:
I = imread('lena.gif');
I = imread('LL1.gif');
I = uint8(I);
L1 = uint8(L1);
% I = im2double(I);
% L1 = im2double(L1)
mse = sum((I(:)-L1(:)).^2)/numel(L1);
psnr1 = 10*log10(255*255/mse);
fprintf('\n MYYYY The PSNR is: %0.2f', psnr1);
and results are also not logically. It is know that if PSNR<=30 then image having low quality, else if PSNR>=30 && PSNR<=60 then image having Medium quality else image having good quality.
What is wrong with PSNR function?
  1 件のコメント
Walter Roberson
Walter Roberson 2018 年 5 月 16 日
mse = sum((double(I(:))-double(L1(:))).^2)/numel(L1);

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2018 年 5 月 16 日
montage({'lena.gif','L1.gif'})
When you compare them side by side you can see that the wavelet processed one is low quality.
  4 件のコメント
mavicV
mavicV 2018 年 5 月 17 日
Yes, it is recognizable, but look at quality at that images with 30 PSNR and my image with 27.68 PSNR, my look almost like original, so PSNR is to low for that and should be over 40 like your example. Look example that i attached and compare PSNR with your example.
Walter Roberson
Walter Roberson 2018 年 5 月 17 日
You are using too small of a figure to see the differences. Use the montage() command I showed, and display with a minimum figure size of 720 x 1440

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by