imaqTransformPixelToRealWorld

NI Vision for LabWindows/CVI Function

imaqTransformPixelToRealWorld

Usage

TransformReport* imaqTransformPixelToRealWorld(const Image* image, const PointFloat* pixelCoordinates, int numCoordinates);

Purpose

Transforms pixel coordinates to real-world coordinates, according to the calibration information contained in an image.

Note  You must first attach calibration information to this image by using one of the following functions:
imaqCopyCalibrationInfo2()
imaqLearnCalibrationGrid()
imaqLearnCalibrationPoints()
imaqSetSimpleCalibration()

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_U16, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name

Type

Description

image const Image* The image whose calibration information the function uses to transform the pixel coordinates.
pixelCoordinates const PointFloat* The array of pixel coordinates the function transforms to real-world coordinates. This parameter is required and cannot be NULL.
numCoordinates int The number of coordinates in the array.

Return Value

Type

Description

TransformReport* On success, this function returns a report describing the real world coordinates. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the report, dispose of it by calling imaqDispose().