📄 check.m
字号:
%a,b 为inputf的size
%dctcompr('lean.tif',2000,'out.tif');
function [PSNR]=check(Outf,Inputf,a,b)
Outf=double(Outf); Inputf=double(Inputf);
%load test
%load asd
SQRT=0;
for i=1:a
for j=1:b
SQRT=SQRT+(double(Inputf(i,j))-double(Outf(i,j)))^2;
end
end
MSE=SQRT/a/b;
RMSE=sqrt(MSE);
LINE=zeros(1,a*b);
for i=1:a
LINE=[LINE,double(Inputf(i,:))];
end
VAR=var(LINE);
SNR=10*log10(VAR/MSE);
PSNR=20*log10(255/RMSE);
return ;
beep on;
beep;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -