资源简介
matlab开发-calcpsnr。一个简单的函数来查找两个图像之间的psnr!

代码片段和文件信息
% This function PSNR = calcpsnr(fF) will compute the PSNR of two given
% images. The function accepts as inputs the 2 images where the first
% image is the source image f(xy) containing N by M pixels and the second
% is the reconstructed image F(xy). [note f and F must be between 0 and 255]
% The function also calculates the Error image by taking the difference
% between the reconstructed and original pixels.
% The typical construction of the error image multiples the difference by a
% constant to increase the visible difference and translates the entire
% image to a gray level.
% Formulas for these computations have been gotten from
% http://bmrc.berkeley.edu/courseware/cs294/fall97/assignment/psnr.html on
% July 26th 2007. The code was put together by me Toritseju Okpotse same
% day.
%The code has been modified on 11-11-2008 by me Gholamreza Anbarjafari
%(Shahab).
function calcpsnr(fF)
[N M] = size(F);
MSE = sqrt((sum(sum((double(f)-double(F)).^2)))/(N*M));
PSNR = 20*log10(255/MSE);
sprintf(‘The PSNR of given image is: %5.2fdB.‘PSNR)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1117 2009-05-20 06:12 calcpsnr.m
文件 1318 2014-02-12 12:40 license.txt
- 上一篇:matlab开发-最大相关系数
- 下一篇:matlab开发-TraCI4Matlab
相关资源
- matlab开发-南极洲边界线和南极洲边界
- matlab开发-CSF批次模拟过滤器
- matlab开发-Image2Data
- matlab开发-移动对象跟踪基到背景减法
- matlab开发-灰度图像的jpeg压缩
- matlab开发-BundleAdjustment
- matlab开发-FaceFindDllContent用于FaceDetec
- matlab开发-彩色图像对比度增强
- matlab开发-MeshLBP
- matlab开发-使用与旋转匹配的模板查找
- matlab开发-图像超分辨率迭代反投影算
- matlab开发-drawline
- matlab开发-导向控制机器人
- matlab开发-一幅图像的噪声估计
评论
共有 条评论