Morphological closing of grayscale pixel data
visionhdl.GrayscaleClosing
performs a morphological
dilation operation, followed by a morphological erosion operation, using the same
neighborhood for both calculations. The object operates on a stream of pixel intensity
values. You can specify a neighborhood, or structuring element, of up to 32×32
pixels. For line, square, or rectangle structuring elements more than 8 pixels wide, the
object uses the Van Herk algorithm to find the maximum and minimum. For structuring
elements less than 8 pixels wide, or that contain zero elements, the object implements a
pipelined comparison tree to find the maximum and minimum.
This object uses a streaming pixel interface with a structure
for frame control signals. This interface enables the object to operate independently of image
size and format, and to connect with other Vision HDL Toolbox™ objects. The object accepts and returns a scalar pixel value and control signals
as a structure containing five signals. The control signals indicate the validity of each pixel
and its location in the frame. To convert a pixel matrix into a pixel stream and control
signals, use the visionhdl.FrameToPixels
object. For a full
description of the interface, see Streaming Pixel Interface.
Note
Starting in R2016b, instead of using the step
method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For
example, y = step(obj,x)
and y = obj(x)
perform equivalent operations.
returns a
System object, C
= visionhdl.GrayscaleClosingC
, that performs morphological closing on a pixel
stream.
returns a System object, C
= visionhdl.GrayscaleClosing(Name
,Value
)C
, with additional options specified by one or more
Name
,Value
pair arguments.
Name
is a property name and
Value
is the corresponding value. Name
must
appear inside single quotes (''
). You can specify several name-value
pair arguments in any order as Name1,Value1,...,NameN,ValueN
.
Properties not specified retain their default values.
|
Pixel neighborhood, specified as a vector or matrix of
The object supports neighborhoods of up to 32×32 pixels.
To use a structuring element, specify Default: |
|
Specify a power of two that accommodates the number of active pixels in a single horizontal line. Choose a power of two that accommodates the number of active
pixels in a horizontal line. If you specify a value that is not a
power of two, the object uses the next largest power of two. The object
allocates (neighborhood lines – 1)-by- Default: |
step | Report closed pixel value based on neighborhood |
Common to All System Objects | |
---|---|
release | Allow System object property value changes |
This object implements the algorithms described on the Grayscale Closing block reference page.
Grayscale Closing | visionhdl.FrameToPixels
| visionhdl.GrayscaleDilation
| visionhdl.GrayscaleErosion
| visionhdl.GrayscaleOpening
| imclose
(Image Processing Toolbox)