negetive valu for PSNR after image enhancment in MATLAB
4 次查看(过去 30 天)
显示 更早的评论
Hi, after image enhancement in frequency domain for assessment calculate psnr and value of psnr and snr is negative. class of input and output image is double.
ref = imread('img.tif');
ref=im2double(ref);
%A = processing(ref);
%Calculate the PSNR.
[peaksnr, snr] = psnr(A, ref);
please guide me about valu of PSNR.
0 个评论
采纳的回答
Image Analyst
2016-5-16
What is A??? And you forgot to attach img.tif and the "A" image, so I'm not going to do anything yet.
Since
PSNR=10log10(peakval^2/MSE)
and since you can't have negative values of PSNR unless MSE < peakValue^2, you must have A and ref on different scales, like you called im2double on one but not the other.
2 个评论
Image Analyst
2016-5-19
Yes, but im2double() scaled the data to between 0 and 1. Did you also do that for A? I'm thinking not otherwise the SNR would not be negative.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!