Home > freetb4matlab > image > dilate.m

# dilate

## PURPOSE

% Perform a dilation morphological operation on a binary image.

## SYNOPSIS

function BW2 = dilate(BW1, SE, a, b)

## DESCRIPTION

```% -*- texinfo -*-
% @deftypefn {Function File} {@var{BW2} = } dilate (@var{BW1},@var{SE})
% @deftypefnx {Function File} {@var{BW2} = } dilate (@var{BW1},@var{SE},@var{alg})
% @deftypefnx {Function File} {@var{BW2} = } dilate (@var{BW1},@var{SE},...,@var{n})
% Perform a dilation morphological operation on a binary image.
%
% BW2 = dilate(BW1, SE) returns a binary image with the result of a dilation
% operation on @var{BW1} using neighbour mask @var{SE}.
%
% For each point in @var{BW1}, dilate search its neighbours (which are
% defined by setting to 1 their in @var{SE}). If any of its neighbours
% is on (1), then pixel is set to 1. If all are 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 = dilate(BW1, SE, alg) returns the result of a dilation operation
% using algorithm @var{alg}. Only 'spatial' is implemented at the moment.
%
% BW2 = dilate(BW1, SE, ..., n) returns the result of @var{n} dilation
% operations on @var{BW1}.
%
% @seealso{erode}
% @end deftypefn```

## CROSS-REFERENCE INFORMATION

This function calls:
This function is called by:
• bwmorph % Perform a morphological operation on a binary image.
• edge % Detect edges in the given image using various methods. The first input @var{im}

Generated on Sat 16-May-2009 00:04:49 by m2html © 2003