getStructuringElement | R Documentation |
getStructuringElement
is a convenience function to create
structuring elements with defined shapes that can be used to filter images
with filter2D
.
getStructuringElement(
k_shape = "rectangle",
k_height = 5,
k_width = 5,
anchor = c(-1, -1)
)
k_shape |
A string corresponding to the shape of the structuring element. Valid kernel shapes are:
|
k_height |
The half-height in pixels of the structuring element. |
k_width |
The half-width in pixels of the structuring element. |
anchor |
A 2-element numeric vector defining the anchor position within the cross-shaped structuring element. The default value (−1,−1) means that the anchor is at the center. Note that only the shape of a cross-shaped kernel depends on the anchor position. |
A matrix of 0s and 1s.
Simon Garnier, garnier@njit.edu
filter2D
getStructuringElement()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.