Code covered by the BSD License  

Highlights from
Image Quality - Index Analysis GUI

image thumbnail

Image Quality - Index Analysis GUI

by

 

29 Apr 2013 (Updated )

This GUI measures the image quality/error between 2 or more images (original,test1/test2/.../testn).

rmse_fs(x,y,ws)
function [rmse, rmse_map] = rmse_fs(x,y,ws)

% RMSE calculator

% 02/12/2009 Version 1.5    - Hyperspectral support
% 05/03/2010 Version 2.0    - Double precision, RAM efficiency
% 25/06/2010 Version 2.2    - Excel Output option
% 08/08/2011 Version 2.4F   - Function Version
% 04/12/2012 Version 3.4F   - Sliding Window
% 27/01/2013 Version 4.4F   - Calculates index from valid area

% Author: Aristidis D. Vaiopoulos

if nargin < 2
    error('This function needs at least 2 arguments')
end
% Default window size
if nargin == 2
    ws = 8;
end

nresf = ws^2;
nxn_sum_filter = ones(ws);
num = (single(x) - single(y)).^2;
num = filter2(nxn_sum_filter,num);
rmse_map = sqrt(num./nresf);
s = round(ws/2);
rmse = mean2( rmse_map(s:end-s,s:end-s) );

end

Contact us