TRANSFORMZ function

Synopsis
This function transforms the specified value from a calibrated depth (along Z) to a pixel intensity value, or vice versa.
Variations
TRANSFORMZ(Value, TransformType, PixelType, CalibratedImage)
Returns the specified value, transformed from a calibrated depth to a pixel intensity value, or vice versa; the transformation uses the calibration associated with the CalibratedImage parameter.
Parameters
Value

Specifies the value to transform.

Supported types: Numeric.
TransformType

Specifies the transformation to perform. This parameter should be set to one of the following values:

Value Description
PixelToWorld

Specifies that the Value parameter is a pixel intensity value, and this function will return a depth value in calibrated units.

WorldToPixel

Specifies that the Value parameter is a depth value in calibrated units, and this function will return a pixel intensity value.

Supported types: Constant.
PixelType

Specifies the bit depth and type to use for the pixel intensity value. This parameter should be set to one of the following values:

Value Description
Unsigned8Bit

Specifies that the depth map passed to the CalibratedImage parameter is an unsigned, 8-bit depth map. Pixel intensity values can range from 0 to 255.

(summarize)
Unsigned16Bit

Specifies that the depth map passed to the CalibratedImage parameter is an unsigned, 16-bit depth map. Pixel intensity values can range from 0 to 65,535.

(summarize)
Supported types: Constant.
CalibratedImage

Specifies the calibrated depth map upon which the transformation will be based.

Supported types: Image.
Returns
Returned types: Numeric.
Examples
1.

This example returns a depth value in calibrated units, based on the calibration associated with Camera.DepthMap.Unsigned8Bit.

TRANSFORMZ(30, PixelToWorld, Unsigned8Bit, Camera.DepthMap.Unsigned8Bit)