Motive API Camera Calibration

This page provides a sample and instructions on how to use Motive API functions to calibrate a camera system.

Sample Code


The following sample code demonstrates calibration process using the Motive API. For details on specific functions, please refer to the Motive API: Function Reference page.

Masking

Auto-Masking

Auto-Masking is done directly by calling the TT_AutoMaskAllCameras function. When this is called, Motive will sample for a short amount of time and apply a mask to the camera imagers where light was detected.

<source> //== To auto-mask, call TT_AutoMaskAllCameras().

TT_AutoMaskAllCameras(); printf( "============\nCamera masking started\n============\n" ); </source>

Camera Mask

This function returns memory block of the mask. One bit per a pixel of the mask. Masking pixels are rasterized from left to right and from top to bottom of the camera's view.

Clear Masks

This function can clear existing masks from the 2D camera view. It returns true when it successfully removes pixel masks. Otherwise, masking is always additive through the API.

Set Camera Mask

The TT_SetCameraMask can be used to replace the existing camera mask for any camera. A mask is an array of bytes, one byte per mask pixel block. Returns true when masks are applied.

Wanding

Ground Plane

Setting ground plane is done directly by calling the TT_SetGroundPlane function. When this is called, camera system will search for 3-markers that resemble a calibration square and uses the inputted vertical offset value to configure the ground plane.

Last updated

Was this helpful?