


% -*- texinfo -*-
% @deftypefn {Function File} {@var{eul} = } bweuler (@var{BW},@var{n})
% Calculates the Euler number of a binary image.
%
% @var{eul}=bweuler(@var{BW}, @var{n}) calculates the Euler number @var{eul} of a binary
% image @var{BW}, which is a scalar whose value is the total number of
% objects in an image minus the number of holes.
%
% @var{n} can have the values:
% @table @code
% @item 4
% bweuler will use 4-connected neighbourhood definition.
% @item 8
% bweuler will use 8-connected neighbourhood definition. This is the
% default value.
% @end table
%
% This function uses Bit Quads as described in 'Digital Image
% Processing' to calculate euler number.
%
% References:
% W. K. Pratt, 'Digital Image Processing', 3rd Edition, pp 593-595
%
% @seealso qtgetblk
% @end deftypefn