| MIL 10 Reference
| Customize Help
| Save Settings

McalTransformResult



See also
Availability
Not available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
None.
Synopsis
Convert a result between its world and pixel value.
Syntax
void McalTransformResult(
MIL_ID CalibrationOrImageId, //in
MIL_INT64 TransformType, //in
MIL_INT64 ResultType, //in
MIL_DOUBLE Result, //in
MIL_DOUBLE *TransformedResultPtr //out
)
Description

This function converts a specific result (a length, area, or angle) from its pixel value to its world value or vice-versa. The conversion can be performed according to a calibration context, calibrated image, or corrected image. However, since this function uses the average pixel size to perform the conversion, results will be more accurate if you use a corrected image.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
CalibrationOrImageId

Specifies the identifier of the calibration context, calibrated image, or corrected image.

When specifying a calibrated image or corrected image, the image cannot be associated with a region of interest (ROI), otherwise an error will occur.

TransformType

Specifies whether to perform a pixel-to-world or world-to-pixel conversion. This parameter must be set to one of the following values:

function map For specifying pixel-to-world or world-to-pixel
CollapseValue Description
Collapse M_PIXEL_TO_WORLD

Converts from pixel to world.

Collapse M_WORLD_TO_PIXEL

Converts from world to pixel.

ResultType

Specifies the type of result the given input value represents. This parameter must be set to one of the following values:

function map For specifying the type of result
CollapseValue Description
Collapse M_ANGLE

Represents an angle.

An angle interpreted with respect to the pixel coordinate system (M_PIXEL_TO_WORLD) is always measured counter-clockwise. For information on the angle's direction of rotation when interpreting the angle with respect to the relative coordinate system (M_WORLD_TO_PIXEL), see the Angle convention in MIL subsection of the Working with real-world units section of Chapter 25: Calibrating your camera setup.

(summarize)
Collapse M_AREA

Represents an area.

Collapse M_LENGTH

Represents a length (for example, the perimeter of an object).

Collapse M_LENGTH_X

Represents a length in the X-direction only.

Collapse M_LENGTH_Y

Represents a length in the Y-direction only.

Result

Specifies the input value.

TransformedResultPtr

Specifies the address in which to place the output value.

Compilation information
Header Include mil.h.
Library Use mil.lib; milcal.lib.
DLL Requires mil.dll; milcal.dll.
TRUE PROC NONE NULL PROC NONE PIXEL TO WORLD WORLD TO PIXEL ANGLE AREA LENGTH LENGTH X LENGTH Y