MIL_ID AugmentationContextImId, | //in |
MIL_ID SrcImageBufId, | //in |
MIL_ID DstImageBufOrAugmentationResultImId, | //in |
MIL_INT64 SeedValue, | //in |
MIL_INT64 ControlFlag | //in |
This function performs an augmentation operation that allows you to create a plausible variation of an image. This is done by applying a specified ordered set of image processing operations with randomized settings within a specified range. To establish the image processing operations that MimAugment() can perform, call MimControl() with M_AUG_..._OP.
MimAugment() places its results in the specified destination buffer, which can be an image or an augmentation result.
The image processing operations that you specify MimAugment() to perform (M_AUG_..._OP) are prioritized as follows:
1. Affine operations, such as: |
2. Structure operations, such as: |
3. Geometric operations, such as: |
4. Intensity operations, such as: |
5. Linear filter operations, such as: |
6. Noise operations, such as: |
To modify the order in which MimAugment() prioritizes the specified image processing operations, call MimControl() with M_PRIORITY.
Specifies the identifier of the augmentation context. The context must have been allocated using MimAlloc() with M_AUGMENTATION_CONTEXT.
Specifies the identifier of the source image buffer. If you are preprocessing the augmentation context (M_PREPROCESS), set this parameter to M_NULL.
The image buffer can be grayscale or color (1- or 3-bands); it can be a 1-, 8-, or 16-bit unsigned buffer, or a 32-bit floating-point buffer (with values that are normalized between 0.0 and 1.0). You must allocate this buffer using MbufAlloc...() with M_IMAGE + M_PROC.
You can perform any image processing operation (M_AUG_..._OP) on all supported source image buffers, except 1-bit unsigned images or 1-band images.
1-bit unsigned images do not support the following: |
1-band images do not support the following: |
When specifying a color (3-band) image, MimAugment() assumes an RGB color space by default. Operations that require a different color space (for example, HSV) internally convert the source image color. If your source image is not RGB, the conversion produces erroneous results.
Specifies the identifier of the destination in which to write the result of the augmentation transformation. The identifier must be for an image buffer or an augmentation image processing result buffer. If you are preprocessing the augmentation context (M_PREPROCESS), set this parameter to M_NULL.
The image buffer can be grayscale or color (1- or 3-bands); it can be a 1-, 8-, or 16-bit unsigned buffer, or a 32-bit floating-point buffer. You must allocate this buffer using MbufAlloc...() with M_IMAGE + M_PROC.
The augmentation result buffer must have been allocated on the required system using MimAllocResult() with M_AUGMENTATION_RESULT.
If you specify an image buffer that has an ROI associated with it, the ROI must be in raster format; otherwise, you will get an error.
Specifies the initial value that will generate the randomized settings for the image processing operations used to perform the augmentation. This parameter must be set to one of the following values.
For specifying the seed that will generate the
randomized settings
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value. This depends on the seed mode, which is set using MimControl() with M_AUG_SEED_MODE. To use M_DEFAULT, the seed mode must be set to M_RNG_AUTO (default) or M_RNG_INIT_VALUE. (summarize)Specifies the default value. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_NULL |
Specifies that you are preprocessing the augmentation context (M_PREPROCESS). |
||||||||||||||||||||||||||||||||||||||
Value >= 0 |
Specifies a user-defined seed value. You can only specify a user-defined seed if MimControl() with M_AUG_SEED_MODE is set to M_USER_DEFINED_SEED. You cannot specify a value that is greater than the maximum value of a MIL_INT32. (summarize)Specifies a user-defined seed value. (more details...) |
Specifies whether MimAugment() should perform the augmentation, or should explicitly preprocess the augmentation context. If you do not explicitly preprocess the context (M_PREPROCESS), MimAugment() preprocesses it the first time you call the function.
This parameter must be set to one of the following values.
For specifying the operation to perform
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Performs the augmentation. |
||||||||||||||||||||||||||||||||||||||
M_PREPROCESS |
Preprocesses the specified augmentation context explicitly. In this case, you must set the SrcImageBufId, DstImageBufOrAugmentationResultImId, and SeedValue parameters to M_NULL. (summarize)Preprocesses the specified augmentation context explicitly. (more details...) |
Header | Include mil.h. |
Library | Use mil.lib; milim.lib. |
DLL | Requires mil.dll; milim.dll. |