필터 지우기
필터 지우기

negetive valu for PSNR after image enhancment in MATLAB

조회 수: 2 (최근 30일)
fred bnm
fred bnm 2016년 5월 15일
댓글: Image Analyst 2016년 5월 19일
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.

채택된 답변

Image Analyst
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
fred bnm
fred bnm 2016년 5월 19일
"ref" convert to double for frequency filtering.
Image Analyst
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!

Translated by