imaqLineGaugeTool2

NI Vision for LabWindows/CVI Function

imaqLineGaugeTool2

Usage

int imaqLineGaugeTool2(const Image* image, Point start, Point end, LineGaugeMethod method, const EdgeOptions* edgeOptions, const CoordinateTransform2* transform, float* distance);

Purpose

Measures the distance between selected edges of a line with high-precision subpixel accuracy.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name

Type

Description

image const Image* The image in which the function measures the distance between edges.
start Point The starting point of the line.
end Point The ending point of the line.
method LineGaugeMethod The measurement method.
edgeOptions const EdgeOptions* Describes how you want the function to find edges. If you set method to IMAQ_POINT_TO_POINT, the function ignores edgeOptions. If you set method to anything other than IMAQ_POINT_TO_POINT, this parameter is required and cannot be NULL.
transform const CoordinateTransform2* An optional specification of the coordinate transform for the line. This parameter specifies how to transform the location of the edge detection based on the difference between the reference coordinate system and the measurement coordinate system. Set this parameter to NULL if you do not need to transform the line.
distance float* On return, the distance between edges and/or points. This parameter is required and cannot be NULL.

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().