imaqTransformROI

NI Vision for LabWindows/CVI Function

imaqTransformROI

Usage

int imaqTransformROI(ROI* roi, Point originStart, float angleStart, Point originFinal, float angleFinal);

Purpose

Rotates and translates a region of interest (ROI) from one coordinate system to another coordinate system within an image.

Note  This function is obsolete. The replacement function is imaqTransformROI2(). The new function uses a new structure called a CoordinateSystem. A CoordinateSystem accounts for the direction of the y-axis, for which imaqTransformROI() does not take into account. In addition, a CoordinateSystem uses a PointFloat to represent the origin, which allows for increased accuracy.

Parameters

Name

Type

Description

roi ROI* The ROI to transform.
originStart Point The origin of the starting coordinate system.
angleStart float The angle, in degrees, of the x-axis of the starting coordinate system relative to the x-axis of the image.
originFinal Point The origin of the new coordinate system.
angleFinal float The angle, in degrees, of the x-axis of the new coordinate system relative to the x-axis of the image.

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