.%%% Acknowledgment% This function calls the mex functions implemented in the original [COMPASS]
% code by Ruzon & Tomasi.%%% Contact% (ISR-2/LANL)
%%% See also% Ressembles:% ,
% ,% ,% ,% ,
% ,% ,% ,% ,
% .% Requires:% .
%% Function implementationfunction [S, O, A, U] = compassedge(I, varargin)%%
% parsing parameterserror(nargchk(1, 16, nargin, 'struct'));error(nargoutchk(1, 4, nargout, 'struct'));
if ~isnumeric(I) error('cannyedge:inputparameter','a matrix is required in input'); end
p = createParser('COMPASSEDGE'); p.addOptional('sigma', 1, @(x)isscalar(x) && x>=0.05);p.addParamValue('angles', 180, @(x) (isscalar(x) || isvector(x)) && ...
all(x>=0 & x<=360));p.addParamValue('nwedges', 6, @(x)isscalar(x) & x>=1);p.addParamValue('gray', false, @(x)islogical(x));
% parse and validate all input argumentsp.parse(varargin{:}); p = getvarParser(p);
%%% calculation[S, O, A, U] = compassedge_base(I, p.sigma, p.angles, p.nwedges, p.gray);
%%% display
if p.disp figure, imagesc(S), axis image off, title('compass strenght'); if size(S,3)==1; colormap gray; endend
end % end of compassedge##### SOURCE END #####
-->