MIL_ID BufId, | //in |
MIL_DOUBLE ScaleX, | //in |
MIL_DOUBLE ScaleY, | //in |
MIL_DOUBLE Offset, | //in |
MIL_INT64 ControlFlag | //in |
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 MIL buffer, such as an array, image, kernel, LUT, or structuring element buffer.
This function generates the ramp data using the following formula: BufId[x,y] = ScaleX * x + ScaleY * y + Offset.
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.
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.
If you specify an image buffer, it must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |