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

nankill(array_with_nans,...
function [array_without_nans nan_q nan_index] = nankill(array_with_nans,...
                                                elimination_value,verbosity)

% N-D NaN Killer

% 24/11/2010 - Version 1.0
% 23/12/2012 - Version 2.0

% Author: Aristides D. Vaiopoulos

if nargin == 1
    elimination_value = 0;
    verbosity = 0;
end
if nargin == 2
    verbosity = 0;
end
% Prepare NaN-free array
array_without_nans = array_with_nans;
% Construct index logical array 
nan_index = isnan(array_with_nans);
array_without_nans(nan_index) = elimination_value;
% nan_q = nan quantity
nan_q = sum(reshape(nan_index,[numel(nan_index) 1]));

if verbosity == 1 && nan_q > 0
    disp(' ')
    disp(['NaN Killer: Eliminated ',num2str(nan_q),' values with ',...
                                     num2str(elimination_value),'.'])
    disp(' ')
end


end

Contact us