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).

rase3d(x,y,ws)
function [rase_pb, rase_mpb, rase, rase_map] = rase3d(x,y,ws)

% RASE calculator

% 21/08/2009 Version 1.0
% 02/12/2009 Version 1.5    - hyperspectral support
% 05/03/2010 Version 2.0    - Double precision, RAM efficiency
% 08/08/2011 Version 2.2F   - Function Version
% 07/01/2013 Version 3.2F   - Sliding window
% 27/01/2013 Version 4.2F   - 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
nb = size(x,3);

[~,~,rmse_map] = rmse3d(x,y,ws);

% Mean kernel
mk = fspecial('average',ws);
% xmean
x = single(x);
xm = imfilter(x,mk,'replicate');
rase_map = 100./ (sum(xm,3)/nb) .* sqrt( sum(rmse_map.^2,3) / nb );
% Kill Nans
rase_map = nankill(rase_map,0);
% Kill Infs
rase_map = infkill(rase_map,1);
s = round(ws/2);
rase = mean2( rase_map(s:end-s,s:end-s) );
rase_mpb = 100./xm .* sqrt( rmse_map.^2 );
% Kill Nans
rase_mpb = nankill(rase_mpb,0);
% Kill Infs
rase_mpb = infkill(rase_mpb,1);
rase_pb = mean3( rase_mpb(s:end-s,s:end-s,:) );

end

Contact us