Skip to main content

MimAugment

BoardSupported
Host SystemYes
V4L2Yes
Clarity UHDYes
Concord PoENo
GenTLYes
GevIQYes
GigE VisionYes
IndioNo
Iris GTXYes
Radient eV-CLYes
Rapixo CLYes
Rapixo CoFYes
Rapixo CXPYes
USB3 VisionYes

Perform an augmentation operation on an image.

Syntax

void MimAugment(
AIL_ID AugmentationContextImId, //in
AIL_ID SrcImageBufId, //in
AIL_ID DstImageBufOrAugmentationResultImId, //out
AIL_INT64 SeedValue, //in
AIL_INT64 ControlFlag //in
)

Description

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: - M_AUG_ROTATION_OP
- M_AUG_SCALE_OP
- M_AUG_TRANSLATION_X_OP
- M_AUG_TRANSLATION_Y_OP
- M_AUG_ASPECT_RATIO_OP
- M_AUG_SHEAR_X_OP
- M_AUG_SHEAR_Y_OP
2. Structure operations, such as: - M_AUG_DILATION_OP
- M_AUG_EROSION_OP
- M_AUG_DILATION_ASYM_OP
- M_AUG_EROSION_ASYM_OP
3. Geometric operations, such as: - M_AUG_FLIP_OP
- M_AUG_CROP_OP
- M_AUG_REDUCE_OP
4. Intensity operations, such as: - M_AUG_INTENSITY_MULTIPLY_OP
- M_AUG_INTENSITY_ADD_OP
- M_AUG_GAMMA_OP
- M_AUG_LIGHTING_DIRECTIONAL_OP
- M_AUG_SATURATION_GAIN_OP
- M_AUG_HUE_OFFSET_OP
- M_AUG_HSV_VALUE_GAIN_OP
5. Linear filter operations, such as: - M_AUG_SMOOTH_DERICHE_OP
- M_AUG_SMOOTH_GAUSSIAN_OP
- M_AUG_BLUR_MOTION_OP
- M_AUG_SHARPEN_DERICHE_OP
6. Noise operations, such as: - M_AUG_NOISE_GAUSSIAN_ADDITIVE_OP
- M_AUG_NOISE_MULTIPLICATIVE_OP
- M_AUG_NOISE_SALT_PEPPER_OP

To modify the order in which MimAugment prioritizes the specified image processing operations, call MimControl with M_PRIORITY.

Parameters

AugmentationContextImId (in, AIL_ID)

Specifies the identifier of the augmentation context. The context must have been allocated using MimAlloc with M_AUGMENTATION_CONTEXT.

SrcImageBufId (in, AIL_ID)

Specifies the identifier of the source image buffer. If you are preprocessing the augmentation context (M_PREPROCESS), set this parameter to M_NULL.

DstImageBufOrAugmentationResultImId (out, AIL_ID)

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.

SeedValue (in, AIL_INT64)

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

ValueDescription
M_DEFAULTSpecifies 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.
M_NULLSpecifies that you are preprocessing the augmentation context (M_PREPROCESS).
0 <= Value < AIL_INT32_MAXSpecifies 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.

ControlFlag (in, AIL_INT64)

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.

For specifying the operation to perform

ValueDescription
M_DEFAULTPerforms the augmentation.
M_PREPROCESSPreprocesses the specified augmentation context explicitly. In this case, you must set the SrcImageBufId, DstImageBufOrAugmentationResultImId, and SeedValueparameters to M_NULL.
Copyright © 2026 Zebra Technologies.