MIL_ID SrcImageBufId, | //in |
MIL_ID DstImageBufId, | //in |
MIL_INT NbIteration, | //in |
MIL_INT64 ProcMode | //in |
This function performs a binary or grayscale dilation on the given source image for the specified number of iterations.
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, which will produce the most accurate possible results for the image border pixels.
Specifies the identifier of the source image buffer.
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.
The source image buffer must be unsigned monochrome 8- or 16-bit.
Specifies the identifier of the destination image buffer.
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.
The destination image buffer must be unsigned monochrome 8- or 16-bit.
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.
When ProcMode is set to M_BINARY_ULTIMATE, this parameter can be set to M_DEFAULT. M_DEFAULT does not specify an explicit number of iterations to perform, instead it indicates to the function that the background should be dilated until all zero (black) blobs are about to disappear. For example, if M_DEFAULT is specified and you have two rectangular blobs (120x6 and 150x16), the dilation will continue until the blobs are reduced to 116x2 and 136x2 respectively (the smallest they can be before the disappear).
Setting NbIteration to M_DEFAULT with any processing mode other than M_BINARY_ULTIMATE will cause an error, that is, M_DEFAULT can only be applied when ProcMode is set to M_BINARY_ULTIMATE.
Specifies the processing mode to use. This parameter can be set to the following:
For specifying the processing
mode
|
|||||||||||||||||||||||||||||||||||||||
Value |
Description
|
MIL system-specific tooltip (†) |
|||||||||||||||||||||||||||||||||||||
M_BINARY |
Performs a binary dilation. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
MIL system specific | |||||||||||||||||||||||||||||||||||||||
Both the source and destination buffers must be packed binary. |
† | d | |||||||||||||||||||||||||||||||||||||
M_BINARY_ULTIMATE |
Performs a binary dilation on white (non-zero) background pixels. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | ||||||||||||||||||
MIL system specific | |||||||||||||||||||||||||||||||||||||||
Both the source and destination buffers must be packed binary. |
† | d | |||||||||||||||||||||||||||||||||||||
M_GRAYSCALE |
Performs a grayscale dilation. (more details...) |
† | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s |
Header | Include mil.h. |
Library | Use mil.lib; milim.lib. |
DLL | Requires mil.dll; milim.dll. |