FindLCDSegments Method

NI Vision for Visual Basic

FindLCDSegments Method

Syntax

CWIMAQVision.FindLCDSegments SourceImage, Regions, LCDInformation [, LitSegments = False] [, Threshold = 8.0]

Return Type

Long

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

Purpose

Calculates the region of interest of each digit from a rectangular area of interest around whole LCD and electroluminescent indicators, which can contain multiple digits. Use this method first in a calibration phase. This method requires that all segments of the indicator are activated.

Remarks

Use this method with U8, I16, and SGL images.

This method is designed for LCD and electroluminescent indicators. It is resistant to light drift. It returns information containing the area of interest containing the global rectangle for each digit. You can pass this information directly to the ReadLCD.

Parameters

SourceImage As CWIMAQImage

The image containing the LCD. All segments of the LCD must be ON.

Regions As CWIMAQRegions

The regions containing the indicator.

LCDInformation As CWIMAQLCDInformation

On return, information about the indicator, including a region of interest for each digit, as well as the values of the LitSegments parameter and the Threshold parameter.

LitSegments As Variant

[Optional] Set this parameter to True if the segments are brighter than the background or False if the segments are darker than the background.

This parameter has a default value of False.

Threshold As Variant

[Optional] Determines whether a segment is ON or OFF. A segment is ON if the standard deviation of the pixels along a line profile across the segment is greater than this threshold. Increase this value when using images with high contrast. Lower this value when using images with low contrast.

This parameter has a default value of 8.0.

Example

LCD Example

See Also

ReadLCD