.%
%% Contact% (ISR-2/LANL)
%%% See also
% Ressembles:% ,
% ,% ,
% ,% ,
% ,% ,
% ,% ,
% ,% .
% Requires:% .
%% Function implementation
function [edgemap,varargout] = anisoedge(I, varargin)
%%% check if possible
if ~exist('anisoedge_mex','file') error('anisoedge:mexfile','mex file anisoedge_mex not found');
end
error(nargchk(1, 14, nargin, 'struct'));error(nargoutchk(1, 2, nargout, 'struct'));
if ~isnumeric(I)
error('anisoedge:inputparameter','matrix required in input'); end
%%
% parsing parameters
p = createParser('ANISOEDGE'); p.addOptional('sigma',1., @(x)isscalar(x) && x>=0.1);
p.addParamValue('iter', 100, @(x)isscalar(x) && x>=1);p.addParamValue('max', true, @(x)islogical(x));
% parse and validate all input arguments
p.parse(varargin{:}); p = getvarParser(p);
%%
% main computation
[edgemap,tmpmag] = anisoedge_base(I, p.sigma, p.iter, p.max);
if nargout==2, varargout{1} = tmpmag; end;
%%% display
if p.disp
figure, imagesc(edgemap), axis image off, title('Anisotropic edge map'); if size(edgemap,3) == 1, colormap gray; end;
end
end % end of anisoedge
##### SOURCE END #####-->