Find local maxima in binary or intensity image
Morphological Operations
visionmorphops
The Dilation block rotates the neighborhood or structuring element 180 degrees. Then it slides the neighborhood or structuring element over an image, finds the local maxima, and creates the output matrix from these maximum values. If the neighborhood or structuring element has a center element, the block places the maxima there, as illustrated in the following figure.
If the neighborhood or structuring element does not have an exact center, the block has a bias toward the lower-right corner, as a result of the rotation. The block places the maxima there, as illustrated in the following figure.
This block uses flat structuring elements only.
Port | Input/Output | Supported Data Types | Complex Values Supported |
---|---|---|---|
I | Vector or matrix of intensity values |
| No |
Nhood | Matrix or vector of ones and zeros that represents the neighborhood values | Boolean | No |
Output | Vector or matrix of intensity values that represents the dilated image | Same as I port | No |
The output signal has the same data type as the input to the I port.
Use the Neighborhood or structuring element source parameter to specify
how to enter your neighborhood or structuring element values. If you select
Specify via dialog
, the Neighborhood or structuring
element parameter appears in the dialog box. If you select Input
port
, the Nhood port appears on the block. Use this port to enter your
neighborhood values as a matrix or vector of 1s and 0s. You can only specify a structuring
element using the dialog box.
Use the Neighborhood or structuring element parameter to define the
neighborhood or structuring element that the block applies to the image. Specify a
neighborhood by entering a matrix or vector of 1s and 0s. Specify a structuring element with
the strel
function from the Image Processing Toolbox™. If the structuring element is decomposable into smaller elements, the block
executes at higher speeds due to the use of a more efficient algorithm. If you enter an array
of STREL objects, the block applies each object to the entire matrix in turn.
Specify how to enter your neighborhood or structuring element values. Select
Specify via dialog
to enter the values in the dialog box.
Select Input port
to use the Nhood port to specify the
neighborhood values. You can only specify a structuring element using the dialog
box.
If you are specifying a neighborhood, this parameter must be a matrix or vector of
1s and 0s. If you are specifying a structuring element, use the
strel
function from the Image Processing Toolbox. This parameter is visible if, for the Neighborhood or
structuring element source parameter, you select Specify via
dialog
.
[1] Soille, Pierre. Morphological Image Analysis. 2nd ed. New York: Springer, 2003.
Computer Vision Toolbox™ software | |
Computer Vision Toolbox software | |
Computer Vision Toolbox software | |
Computer Vision Toolbox software | |
Computer Vision Toolbox software | |
Computer Vision Toolbox software | |
Image Processing Toolbox software | |
Image Processing Toolbox software |