| MIL 10 Reference
| Customize Help
| Save Settings

MimClose



See also
User Guide:
Reference:
Availability
Not available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Perform a binary or grayscale closing-type morphological operation.
Syntax
void MimClose(
MIL_ID SrcImageBufId, //in
MIL_ID DstImageBufId, //in
MIL_INT NbIteration, //in
MIL_INT64 ProcMode //in
)
Description

This function performs a binary or grayscale closing operation on the given source image for the specified number of iterations. A closing is a dilation followed by an erosion.

In binary mode, this function uses a 3x3 full rectangular structuring element; in grayscale mode, a 3x3 empty one.

The overscan pixels are automatically set to the lowest possible buffer value for the dilation and the highest possible buffer value for the erosion, which will produce the most accurate possible results for the image border pixels.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
SrcImageBufId

Specifies the identifier of the data source of the operation. This parameter must be given an image buffer identifier.

This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.

DstImageBufId

Specifies the identifier of the destination of the resulting image. This parameter must be given an image buffer identifier.

This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.

NbIteration

Specifies the number of times to iterate the operation.

When this parameter is set to 0 and ProcMode is set to M_BINARY, the source image is binarized and the result is copied into the destination image buffer.

When this parameter is set to 0 and ProcMode is set to M_GRAYSCALE, the source image is copied into the destination image buffer.

ProcMode

Specifies the processing mode to use. This parameter can be set to the following:

function map For specifying the processing mode
CollapseValue Description
Collapse M_BINARY

Treats non-zero pixels as ones (1) during processing. The resulting non-zero pixels will have all bits set to one.

(summarize)
Collapse M_GRAYSCALE

Uses the source image's gray values for processing. The resulting buffer will also contain gray values.

(summarize)
Compilation information
Header Include mil.h.
Library Use mil.lib; milim.lib.
DLL Requires mil.dll; milim.dll.
PROC NONE PROC NONE BINARY GRAYSCALE