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

rmse3d(x, y, ws)
function [rs, rm, rmaps] = rmse3d(x, y, ws)

% Focal RASE for 3D images/arrays (m*n*z)

% 27/01/2013     -  Version 1.0

% Author:           Aristidis D. Vaiopoulos

if nargin == 2
   ws = 8;
end
% Find dimensions
sizex = size(x);
sizey = size(y);
if ~isequal(sizex,sizey)
    error('Images must have equal dimensions.')
end
% Number of bands
nb = size(x,3);
% Preallocate mean rs
rs = zeros(nb,1);
if nargout == 3
    % Preallocate rmaps (memory voracious)
    rmaps = single(zeros(sizex));
    for b = 1:nb
        [rs(b), rmaps(:,:,b)] = rmse_fs( x(:,:,b),y(:,:,b),ws);
    end
else
    for b = 1:nb
        rs(b) = rmse_fs( x(:,:,b),y(:,:,b),ws );
    end
end
% Average quality 
rm = mean(rs);

end

Contact us