此代码是否适合计算 int16 数据类型图像的 PSNR?
function PSNR = PeakSignaltoNoiseRatio(origImg, distImg)
[M N] = size(origImg);
error = origImg - distImg;
MSE = sum(sum(error.^2)) / (M * N);
PSNR=10*log10(255*255/MSE);
此代码是否适合计算 int16 数据类型图像的 PSNR?
function PSNR = PeakSignaltoNoiseRatio(origImg, distImg)
[M N] = size(origImg);
error = origImg - distImg;
MSE = sum(sum(error.^2)) / (M * N);
PSNR=10*log10(255*255/MSE);