imaqCoordinateReference

NI Vision for LabWindows/CVI Function

imaqCoordinateReference

Usage

int imaqCoordinateReference(const Point* points, ReferenceMode mode, Point* origin, float* angle);

Purpose

Builds a reference for any arbitrary coordinate system with respect to the image plane. The reference of the coordinate system is specified as the position of the origin of the coordinate system and the orientation of its x-axis with respect to that of the image plane.

A CoordinateSystem accounts for the direction of the y-axis, which imaqCoordinateReference() does not account for. In addition, a CoordinateSystem uses a PointFloat to represent the origin, which allows for increased accuracy.

Note  This function is obsolete. The replacement function is imaqBuildCoordinateSystem(), which uses a new structure called a CoordinateSystem.

Parameters

Name

Type

Description

points const Point* An array of points defining the coordinate reference. If mode is IMAQ_COORD_X_Y, the points array must have three points. If mode is IMAQ_COORD_ORIGIN_X, the points array must have two points.
mode ReferenceMode Specifies the method that the function uses to calculate the coordinate system.
origin Point* On return, the origin of the coordinate system. Set this parameter to NULL if you do not need this information.
angle float* On return, the angle, in degrees, of the x-axis of the coordinate system relative to the x-axis of an image. Set this parameter to NULL if you do not need this information.

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