Skip to main content

MgenRamp

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

Generate 2D ramp data into a buffer.

Syntax

void MgenRamp(
AIL_ID BufId, //out
AIL_DOUBLE ScaleX, //in
AIL_DOUBLE ScaleY, //in
AIL_DOUBLE Offset, //in
AIL_INT64 ControlFlag //in
)

Description

This function uses the specified scale factors and offset to generate a 2D ramp (linearly increasing/decreasing data in both X and Y) in the specified buffer. You can specify any Aurora Imaging Library buffer, such as an array, image, kernel, LUT, or structuring element buffer.

This function generates the ramp data using the following formula: [BufId](../../Reference/gen/MgenRamp.md)[_x_,_y_] = [ScaleX](../../Reference/gen/MgenRamp.md) * _x_ + [ScaleY](../../Reference/gen/MgenRamp.md) * _y_ + [Offset](../../Reference/gen/MgenRamp.md).

This function can be useful, for example, to simulate non-uniform lighting in an image (non-uniform lighting is generally approximated by an intensity ramp that is added to the image), or to generate the pixel coordinates of all the pixels of an image.

Parameters

BufId (out, AIL_ID)

Specifies the identifier of the buffer in which to generate values. The buffer must have been previously allocated on the system using MbufAlloc... with M_ARRAY, M_IMAGE, M_KERNEL, M_LUT, or M_STRUCT_ELEMENT.

ScaleX (in, AIL_DOUBLE)

Specifies the factor by which to scale in X.

ScaleY (in, AIL_DOUBLE)

Specifies the factor by which to scale in Y.

Offset (in, AIL_DOUBLE)

Specifies the offset. This corresponds to the value placed in the first location of the buffer.

ControlFlag (in, AIL_INT64)

Reserved for future expansion and must be set to M_DEFAULT.

Copyright © 2026 Zebra Technologies.