imgpsnr.m
来自「本程序的目的是通过变化DCT系数以及寻找可以应用的DCT系数的最小值来进行可扩展」· M 代码 · 共 26 行
M
26 行
% Computes motion compensated image's PSNR%% Input% imgP : The original image % imgComp : The compensated image% n : the peak value possible of any pixel in the images%% Ouput% psnr : The motion compensated image's PSNR%% Written by Aroh Barjatyafunction psnr = imgPSNR(imgP, imgComp, n)[row col] = size(imgP);err = 0;for i = 1:row for j = 1:col err = err + (imgP(i,j) - imgComp(i,j))^2; endendmse = err / (row*col);psnr = 10*log10(n*n/mse);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?