imaqLookup
Usage
int imaqLookup(Image* dest, const Image* source, const short* table, const Image* mask);
Purpose
Performs a transformation on an image by replacing each pixel value with the lookup table entry corresponding to that value.
Image Types Supported
IMAQ_IMAGE_U8, IMAQ_IMAGE_I16
Parameters
Name
|
Type
|
Description
|
---|---|---|
dest | Image* | The destination image. |
source | const Image* | The source image. |
table | const short* | The lookup table. For 8-bit images, the lookup table must contain 256 elements. The function replaces each pixel value v with table[v]. For 16-bit images, the lookup table must contain 65,536 elements. The function replaces each non-negative pixel value v with table[v] and replaces each negative pixel value v with table[65536+v]. |
mask | const Image* | An optional mask image. This image must be an IMAQ_IMAGE_U8 image. The function applies the lookup only to those source pixels whose corresponding mask pixels are non-zero. All other pixels remain unchanged. Set this parameter to NULL to apply the lookup to the entire source image. |
Return Value
Type |
Description |
---|---|
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError(). |