imaqLineGaugeTool

NI Vision for LabWindows/CVI Function

imaqLineGaugeTool

Usage

int imaqLineGaugeTool(const Image* image, Point start, Point end, LineGaugeMethod method, const EdgeOptions* edgeOptions, const CoordinateTransform* reference, float* distance);

Purpose

Measures the distance between selected edges of a line with high-precision subpixel accuracy. This function has the ability to work on a rotated or translated particle. If you supply coordinate transform information, the function transforms the line information you pass from the coordinate system of the particle to the coordinate system of the image.

Note  This function is obsolete. The replacement function is imaqLineGaugeTool2(), which uses the CoordinateTransform2 structure to account for the direction of the y-axis in a coordinate system.

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.
reference const CoordinateTransform* The transform between the coordinate system of the particle and the image. Set this parameter to NULL if you do not want to apply a transform.
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().