MIL_ID SrcImageBufId, | //in |
MIL_ID DstImageBufId, | //in |
MIL_INT NbIteration, | //in |
MIL_INT64 ProcMode | //in |
This function performs a binary or grayscale erosion 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 highest 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.
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.
Specifies the number of times to iterate the operation.
For specifying the number of iterations to
perform
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies that each blob should be eroded until it is about to disappear. This value is only available when ProcMode is set to M_BINARY_ULTIMATE or M_BINARY_ULTIMATE_ACCUMULATE. M_DEFAULT does not specify an explicit number of iterations to perform; instead, it indicates to the function that each blob should be eroded until it is about to disappear. For example, if M_DEFAULT is specified and you have two rectangular blobs (120x6 and 150x17), the erosion will continue until the blobs are reduced to 116x2 and 134x1, respectively (the smallest they can be before they disappear). Setting NbIteration to M_DEFAULT with any processing mode other than M_BINARY_ULTIMATE or M_BINARY_ULTIMATE_ACCUMULATE will cause an error. (summarize)Specifies that each blob should be eroded until it is about to disappear. (more details...) |
||||||||||||||||||||||||||||||||||||||
Value >= 0 |
Specifies the number of iterations. 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. (summarize)Specifies the number of iterations. (more details...) |
Specifies the processing mode to use. This parameter can be set to the following:
For specifying the processing mode
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_BINARY |
Performs a binary erosion on the white (non-zero) blobs in the image. In this case, non-zero pixels are treated as ones (1) during processing. The resulting non-zero pixels will have all bits set to one. (summarize)Performs a binary erosion on the white (non-zero) blobs in the image. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_BINARY_ULTIMATE |
Performs a binary erosion on the white (non-zero) blobs, while preventing them from completely disappearing. When in this processing mode, this operation performs a binary erosion until the number of iterations NbIteration is reached or until the blob is about to disappear. If NbIteration is not set to M_DEFAULT, the specified number of iterations serves as an upper bound limit, and the procedure continues until the specified number of iterations is reached or the blob is about to disappear, whichever comes first. If NbIteration is set to M_DEFAULT, the procedure continues until the non-zero blob is about to disappear. Note that if the erosion splits any blobs, the process continues on each sub-blob evaluating them separately. (summarize)Performs a binary erosion on the white (non-zero) blobs, while preventing them from completely disappearing. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_BINARY_ULTIMATE_ACCUMULATE |
Performs a binary erosion on the white (non-zero) blobs, while preventing them from completely disappearing and keeping track of the number of iterations. When in this processing mode, this operation performs a binary erosion until the number of iterations NbIteration is reached or until the blob is about to disappear. If NbIteration is not set to M_DEFAULT, the specified number of iterations serves as an upper bound limit, and the procedure continues until the specified number of iterations is reached or the blob is about to disappear, whichever comes first. If NbIteration is set to M_DEFAULT, the procedure continues until the non-zero blob is about to disappear. Note that if the erosion splits any blobs, the process continues on each sub-blob, evaluating them separately. The resulting non-zero pixels will be set to the iteration number + 1. For example, consider an erosion with NbIteration set to 2. After the first iteration, the resulting non-zero pixels will be set to 1 + 1 (iteration number) = 2. After the second iteration,the resulting non-zero pixels will be set to 1 + 2 (iteration number) = 3. For more information on erosion see the Erosion and dilation section of Chapter 3: Fundamental image processing. For more information on binary ultimate accumulate erosion, see the Erosion and dilation section of Chapter 3: Fundamental image processing. (summarize)Performs a binary erosion on the white (non-zero) blobs, while preventing them from completely disappearing and keeping track of the number of iterations. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_GRAYSCALE |
Performs a grayscale erosion on the white (non-zero) blobs in the image. In this case, each pixel of the source image is replaced with the minimum value in its neighborhood. (summarize)Performs a grayscale erosion on the white (non-zero) blobs in the image. (more details...) |
Header | Include mil.h. |
Library | Use mil.lib; milim.lib. |
DLL | Requires mil.dll; milim.dll. |