imaqEqualize
Usage
int imaqEqualize(Image* dest, const Image* source, float min, float max, const Image* mask);
Purpose
Calculates the histogram of an image and redistributes pixel values across the desired range to maintain the same pixel value distribution. Pixels whose values are the same before the redistribution also have common pixel values after the redistribution.
Image Types Supported
IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL
Parameters
Name
|
Type
|
Description
|
---|---|---|
dest | Image* | The destination image. |
source | const Image* | The source image. |
min | float | The minimum value of the range to which the function equalizes the image. |
max | float | The maximum value of the range to which the function equalizes the image. |
mask | const Image* | An optional mask image. This image must be an IMAQ_IMAGE_U8 image. The function equalizes only those pixels in the source image whose corresponding pixels in the mask are non-zero. Set this parameter to NULL to equalize the whole 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(). |