MimLutMap()函数

MimLutMap()函数

Synopsis

Perform a point-to-point LUT mapping operation.

Format

void MimLutMap(SrcImageBufId, DestImageBufId, LutBufId)

MIL_ID SrcImageBufId;??? Source image buffer identifier
MIL_ID DestImageBufId;??? Destination image buffer identifier
MIL_ID LutBufId;??? LUT identifier


Description

This function maps each pixel in the specified source image to values determined by the specified look-up table (LUT).
If the source image is signed, negative numbers are treated as unsigned values and address the LUT accordingly. For example, -1 is represented as 0xff for 8-bit image data and 0xffff for 16-bit image data and will therefore address LUT entry 0xff or 0xffff, respectively.
The SrcImageBufId parameter specifies the identifier of the data source of the operation. This parameter must be given an image buffer identifier.

The DestImageBufId parameter specifies the identifier of the destination of the results. This parameter must be given an image buffer identifier.
The LutBufId parameter specifies the LUT through which to map source input values. This parameter must be given a valid LUT buffer identifier.
If the LUT has fewer entries than the full range of source values, unexpected results will occur. If the LUT buffer depth is greater than that of the destination buffer, results will be truncated to fit the destination buffer. LUT entries must have been previously initialized (for example, using MgenLutRamp or MbufPut1d).

Note

Floating point values will be cast as unsigned long values before performing the LUT map operation. Therefore, unexpected results can occur if a floating point value is larger than the unsigned long range.

Status

In-place processing is supported, but the source and destination image buffers cannot partially overlap (a situation that can only occur when using child buffers).

注:用来图像一段灰阶重新映射到别一段,比如10—100这段映射到30—150;