ColorEqualize Method

NI Vision for Visual Basic

ColorEqualize Method

Syntax

CWIMAQVision.ColorEqualize SourceImage, DestImage [, AllPlanes = False]

Return Type

Long

On success, this method returns 0. On failure, this method returns a negative number.

Purpose

Calculates the histogram of the luminance plane or all the planes of a color image and redistributes pixel values across the desired range while maintaining pixel value groupings.

Remarks

Use this method with image types RGB32 and HSL32.

Parameters

SourceImage As CWIMAQImage

The color image to equalize.

DestImage As CWIMAQImage

The resulting color image.

AllPlanes As Variant

[Optional] Set this parameter to True to equalize each plane. Set this parameter to False to equalize the luminance plane only.

This parameter has a default value of False.

Example

Dim i As New CWIMAQImage

i.Type = cwimaqImageTypeRGB32

'Equalize the luminance plane of the image in Viewer1 and the
'store the results in i
CWIMAQVision1.ColorEqualize CWIMAQViewer1.Image, i

'Equalize all the planes of the image in Viewer1.
'Do this operation inplace (store the results in the image in Viewer1)
CWIMAQVision1.ColorEqualize CWIMAQViewer1.Image, CWIMAQViewer1.Image, _
                            True