⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 psnr.m

📁 PDTDFB toolbox The filter bank is described in: The Shiftable Complex Directional Pyramid—Pa
💻 M
字号:
function [gamma] = psnr(x,y)
% Takes two 8-bit IMAGES and computes peak-to-peak signal to noise ratio:
% gamma = 10 log (255^2/MSE)
% x and y must be the same dimension and may be 2D arrays or vectors.

sx = size(x);
sy = size(y);

if sx == sy
dd = x(:) - y(:);
gg = (dd' * dd)/prod(sx);
rr = 255^2./gg;
gamma = 10 * log10(rr);
else
fprintf ('\n Input image dimensions not consistent.');
gamma = NaN;
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -