MIL_ID SrcImageBufId, | //in |
MIL_ID SeedImageBufId, | //in |
MIL_ID DestImageBufId, | //in |
MIL_INT64 Operation, | //in |
MIL_INT64 ProcMode | //in |
This function copies (or reconstructs) blobs or blob holes from the source to the destination buffer, according to the specified operation and processing mode. By default, all non-zero pixels in the source buffer are considered to be part of a blob. Use the M_FOREGROUND_ZERO processing mode to inverse this behavior.
Specifies the identifier of the source image buffer. The source buffer must be a single band, packed binary, 8- or 16-bit unsigned 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 image buffer to use as a seed image. The seed image buffer must be a single band, packed binary, 8- or 16-bit unsigned 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.
A seed image is needed to perform an M_RECONSTRUCT_FROM_SEED type of operation. For any other operation type, set this parameter to M_NULL.
Specifies the identifier of the destination (processed blobs) image buffer. The destination buffer must be a single band, packed binary, 8- or 16-bit unsigned 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 type of operation to perform. This parameter can be set to one of the following values:
For specifying the type of operation to
perform
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_ERASE_BORDER_BLOBS |
All blobs that do not touch the borders of the source image are copied to the destination image buffer according to the selected processing mode. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_EXTRACT_HOLES |
All holes within the blobs of the source buffer are copied to the destination buffer with their pixel values set to their corresponding blob's pixel values, according to the selected processing mode. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FILL_HOLES |
All blobs in the source buffer are copied to the destination buffer according to the selected processing mode, and those blobs with holes are filled according to the processing mode. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_RECONSTRUCT_FROM_SEED |
All blobs in the source buffer that have at least one corresponding foreground seed pixel in the seed buffer are copied to the destination buffer, according to the selected processing mode. (more details...) |
Specifies the processing mode to use.
This parameter should be set to one of the following values:
For specifying the processing mode to
use
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default processing mode (which corresponds to M_BINARY + M_8_CONNECTED). |
||||||||||||||||||||||||||||||||||||||
M_BINARY + |
Specifies that non-zero pixel values will be treated as ones (1) during processing, and the resulting non-zero pixels copied to the destination buffer will be set to the maximum value of that buffer (for example, 0xff for an 8-bit buffer). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_GRAYSCALE + |
Specifies that the values of pixels copied to the destination buffer will be changed to the values of corresponding pixels in the source buffer. |
You can add one of the following values to the above-mentioned values to set the type of connectivity (lattice).
For selecting the type of
connectivity
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description
|
||||||||||||||||||||||||||||||||||||||
M_4_CONNECTED |
Specifies that blobs are computed on a four connected lattice. |
||||||||||||||||||||||||||||||||||||||
M_8_CONNECTED |
Specifies that blobs are computed on an eight connected lattice. (more details...) |
You can add the following value to the above-mentioned values to set the value of the foreground pixels.
For selecting the foreground
pixels
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description
|
||||||||||||||||||||||||||||||||||||||
M_FOREGROUND_ZERO |
Specifies that the pixel values of blobs will consist of zero values and the pixels of the background will consists of non-zero values; that is, the inverse of the usual blob pixel value definition. |
You can add the following value to the above-mentioned values to set whether to accelerate blob reconstruction with seed images.
For accelerating blob reconstruction with
seed images
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description
|
||||||||||||||||||||||||||||||||||||||
M_SEED_PIXELS_ALL_IN_BLOBS |
Optimizes the reconstruction process. (more details...) |
Header | Include mil.h. |
Library | Use mil.lib; milblob.lib. |
DLL | Requires mil.dll; milblob.dll. |