DriveWorks SDK Reference

| 0.6.67 Release

Camera Rig

Detailed Description

Handles representing a camera rig object.

Macros

#define DW_MAX_RIG_CAMERA_COUNT   255
 Defines the maximum number of cameras in a rig. More...
 

Typedefs

typedef struct dwCameraRigObject * dwCameraRigHandle_t
 Handle representing a camera rig object. More...
 
typedef struct dwCameraRigObject const * dwConstCameraRigHandle_t
 Handle representing a const camera rig object. More...
 

Functions

DW_API_PUBLIC dwStatus dwCameraRig_getCam2Rig (dwTransformation *cam2Rig, uint32_t index, dwCameraRigHandle_t obj)
 Gets the relative pose for a camera in a rig. More...
 
DW_API_PUBLIC dwStatus dwCameraRig_initialize (dwCameraRigHandle_t *obj, dwContextHandle_t context, const uint32_t cameraCount)
 Creates and initializes a camera rig. More...
 
DW_API_PUBLIC dwStatus dwCameraRig_initializeFromConfig (dwCameraRigHandle_t *obj, uint32_t *cameraCount, dwCalibratedCameraHandle_t *cameras, uint32_t maxCamerasCount, dwContextHandle_t context, dwRigConfigurationHandle_t rigConfig)
 Creates and initializes a camera rig from a rig configuration and initializes all the necessary cameras. More...
 
DW_API_PUBLIC dwStatus dwCameraRig_release (dwCameraRigHandle_t *obj)
 Releases the camera rig object. More...
 
DW_API_PUBLIC dwStatus dwCameraRig_reset (dwCameraRigHandle_t obj)
 Resets a camera rig. More...
 
DW_API_PUBLIC dwStatus dwCameraRig_setCam2Rig (dwCameraRigHandle_t obj, uint32_t index, const dwTransformation *cam2Rig)
 Sets the relative pose for a camera in a rig. More...
 
DW_API_PUBLIC dwStatus dwCameraRig_setCamera (dwCameraRigHandle_t obj, uint32_t index, dwCalibratedCameraHandle_t camera)
 Sets the camera model for a camera in a rig. More...
 

Macro Definition Documentation

◆ DW_MAX_RIG_CAMERA_COUNT

#define DW_MAX_RIG_CAMERA_COUNT   255

Defines the maximum number of cameras in a rig.

Definition at line 220 of file Camera.h.

Typedef Documentation

◆ dwCameraRigHandle_t

typedef struct dwCameraRigObject* dwCameraRigHandle_t

Handle representing a camera rig object.

A rig corresponds to a collection of cameras rigidly attached to each other. Each camera is described by a calibrated model (dwCalibratedCamera) and a relative pose from the center of the rig to the camera.

Definition at line 213 of file Camera.h.

◆ dwConstCameraRigHandle_t

typedef struct dwCameraRigObject const* dwConstCameraRigHandle_t

Handle representing a const camera rig object.

Definition at line 217 of file Camera.h.

Function Documentation

◆ dwCameraRig_getCam2Rig()

DW_API_PUBLIC dwStatus dwCameraRig_getCam2Rig ( dwTransformation *  cam2Rig,
uint32_t  index,
dwCameraRigHandle_t  obj 
)

Gets the relative pose for a camera in a rig.

Parameters
[out]cam2RigA pointer to the relative pose matrix (rotation+translation).
[in]indexSpecifies the camera index.
[in]objSpecifies the camera rig.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwCameraRig_initialize()

DW_API_PUBLIC dwStatus dwCameraRig_initialize ( dwCameraRigHandle_t obj,
dwContextHandle_t  context,
const uint32_t  cameraCount 
)

Creates and initializes a camera rig.

Parameters
[out]objA pointer to the camera rig handle is returned here.
[in]contextSpecifies a handle to the context under which it is created.
[in]cameraCountSpecifies the number of cameras that the rig has.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwCameraRig_initializeFromConfig()

DW_API_PUBLIC dwStatus dwCameraRig_initializeFromConfig ( dwCameraRigHandle_t obj,
uint32_t *  cameraCount,
dwCalibratedCameraHandle_t cameras,
uint32_t  maxCamerasCount,
dwContextHandle_t  context,
dwRigConfigurationHandle_t  rigConfig 
)

Creates and initializes a camera rig from a rig configuration and initializes all the necessary cameras.

Parameters
[out]objA pointer to the camera rig handle is returned here.
[out]cameraCountA pointer to the number of cameras in the rig.
[out]camerasAn array of handles to the calibrated cameras created for the rig. These must be released with dwCalibratedCamera_release() by the caller.
[in]maxCamerasCountSpecifies the size of the array pointed by cameras.
[in]contextSpecifies the handle to the context under which it is created.
[in]rigConfigSpecifies the configuration of the rig.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwCameraRig_release()

DW_API_PUBLIC dwStatus dwCameraRig_release ( dwCameraRigHandle_t obj)

Releases the camera rig object.

This method releases all resources associated with a camera rig. Note that the rig does not take ownership of the cameras and they should be released separately.

Note
This method renders the handle unusable.
Parameters
[in]objA pointer to the object handle to be released.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST

◆ dwCameraRig_reset()

DW_API_PUBLIC dwStatus dwCameraRig_reset ( dwCameraRigHandle_t  obj)

Resets a camera rig.

Camera models are forgotten and the cam2Rig poses are reset to identity.

Parameters
[in]objSpecifies the camera rig handle to reset.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST

◆ dwCameraRig_setCam2Rig()

DW_API_PUBLIC dwStatus dwCameraRig_setCam2Rig ( dwCameraRigHandle_t  obj,
uint32_t  index,
const dwTransformation *  cam2Rig 
)

Sets the relative pose for a camera in a rig.

Parameters
[in]objSpecifies the camera rig.
[in]indexSpecifies the camera index to set.
[in]cam2RigA pointer to the relative pose matrix (rotation+translation). Pose is copied into the state of the camera rig.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwCameraRig_setCamera()

DW_API_PUBLIC dwStatus dwCameraRig_setCamera ( dwCameraRigHandle_t  obj,
uint32_t  index,
dwCalibratedCameraHandle_t  camera 
)

Sets the camera model for a camera in a rig.

Parameters
[in]objSpecifies the camera rig.
[in]indexSpecifies the camera index to set.
[in]cameraSpecifies the handle to the camera to use for this entry in the camera rig.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT