% -*- texinfo -*- % @deftypefn {Function File} {@var{BW2} = } erode (@var{BW1},@var{SE}) % @deftypefnx {Function File} {@var{BW2} = } erode (@var{BW1},@var{SE},@var{alg}) % @deftypefnx {Function File} {@var{BW2} = } erode (@var{BW1},@var{SE},...,@var{n}) % Perform an erosion morphological operation on a binary image. % % BW2 = erosion(BW1, SE) returns a binary image with the result of an erosion % operation on @var{BW1} using neighbour mask @var{SE}. % % For each point in @var{BW1}, erode searchs its neighbours (which are % defined by setting to 1 their in @var{SE}). If all neighbours % are on (1), then pixel is set to 1. If any is off (0) then it is set to 0. % % Center of @var{SE} is calculated using floor((size(@var{SE})+1)/2). % % Pixels outside the image are considered to be 0. % % BW2 = erode(BW1, SE, alg) returns the result of a erosion operation % using algorithm @var{alg}. Only 'spatial' is implemented at the moment. % % BW2 = erosion(BW1, SE, ..., n) returns the result of @var{n} erosion % operations on @var{BW1}. % % @seealso{dilate} % @end deftypefn