ClassesClassesClassesClasses | | | | Operators

create_camera_setup_modelcreate_camera_setup_modelCreateCameraSetupModelcreate_camera_setup_modelCreateCameraSetupModelCreateCameraSetupModel (Operator)


create_camera_setup_modelcreate_camera_setup_modelCreateCameraSetupModelcreate_camera_setup_modelCreateCameraSetupModelCreateCameraSetupModel — Create a model for a setup of calibrated cameras.


create_camera_setup_model( : : NumCameras : CameraSetupModelID)

Herror create_camera_setup_model(const Hlong NumCameras, Hlong* CameraSetupModelID)

Herror T_create_camera_setup_model(const Htuple NumCameras, Htuple* CameraSetupModelID)

Herror create_camera_setup_model(const HTuple& NumCameras, Hlong* CameraSetupModelID)

void HCameraSetupModel::CreateCameraSetupModel(const HTuple& NumCameras)

void CreateCameraSetupModel(const HTuple& NumCameras, HTuple* CameraSetupModelID)

void HCameraSetupModel::HCameraSetupModel(Hlong NumCameras)

void HCameraSetupModel::CreateCameraSetupModel(Hlong NumCameras)

void HOperatorSetX.CreateCameraSetupModel(
[in] VARIANT NumCameras, [out] VARIANT* CameraSetupModelID)

void HCameraSetupModelX.CreateCameraSetupModel([in] Hlong NumCameras)

static void HOperatorSet.CreateCameraSetupModel(HTuple numCameras, out HTuple cameraSetupModelID)

public HCameraSetupModel(int numCameras)

void HCameraSetupModel.CreateCameraSetupModel(int numCameras)


The operator create_camera_setup_modelcreate_camera_setup_modelCreateCameraSetupModelcreate_camera_setup_modelCreateCameraSetupModelCreateCameraSetupModel creates a new camera setup model and returns a handle to it in CameraSetupModelIDCameraSetupModelIDCameraSetupModelIDCameraSetupModelIDCameraSetupModelIDcameraSetupModelID. The camera setup comprises a fixed number of cameras, which is specified by NumCamerasNumCamerasNumCamerasNumCamerasNumCamerasnumCameras and cannot be changed once the model was created. For each camera, the setup stores its internal parameters, covariances of the internal parameters (optional) and a pose of the camera.

Using set_camera_setup_paramset_camera_setup_paramSetCameraSetupParamset_camera_setup_paramSetCameraSetupParamSetCameraSetupParam, you can change the coordinate system in which the cameras are represented: You can either select a camera and convert all camera poses to be relative to this camera or you can apply a general coordinate transformation, which moves the setup's coordinate system into an arbitrary pose. Changing the coordinate system of the camera setup is particularly useful in cases, where, e.g., you want to represent the cameras in the coordinate system of an object being observed by the cameras. This concept is further demonstrated in the example below.

The internal parameters and pose of a camera are set or modified by set_camera_setup_cam_paramset_camera_setup_cam_paramSetCameraSetupCamParamset_camera_setup_cam_paramSetCameraSetupCamParamSetCameraSetupCamParam. Further camera parameters and general setup parameters can be set by set_camera_setup_paramset_camera_setup_paramSetCameraSetupParamset_camera_setup_paramSetCameraSetupParamSetCameraSetupParam as well. All parameters can be read back by get_camera_setup_paramget_camera_setup_paramGetCameraSetupParamget_camera_setup_paramGetCameraSetupParamGetCameraSetupParam.

A camera setup model can be saved into a file by write_camera_setup_modelwrite_camera_setup_modelWriteCameraSetupModelwrite_camera_setup_modelWriteCameraSetupModelWriteCameraSetupModel and read back by read_camera_setup_modelread_camera_setup_modelReadCameraSetupModelread_camera_setup_modelReadCameraSetupModelReadCameraSetupModel.

Finally, after the camera setup CameraSetupModelIDCameraSetupModelIDCameraSetupModelIDCameraSetupModelIDCameraSetupModelIDcameraSetupModelID is no longer needed, it must be released by clear_camera_setup_modelclear_camera_setup_modelClearCameraSetupModelclear_camera_setup_modelClearCameraSetupModelClearCameraSetupModel.


This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.


NumCamerasNumCamerasNumCamerasNumCamerasNumCamerasnumCameras (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Number of cameras in the setup.

Default value: 2

Suggested values: 1, 2, 3, 4

Restriction: NumCameras >= 1

CameraSetupModelIDCameraSetupModelIDCameraSetupModelIDCameraSetupModelIDCameraSetupModelIDcameraSetupModelID (output_control)  camera_setup_model HCameraSetupModel, HTupleHTupleHCameraSetupModel, HTupleHCameraSetupModelX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle to the camera setup model.

Example (HDevelop)

* Create camera setup of three cameras.
create_camera_setup_model (3, CameraSetupModelID)
gen_cam_par_area_scan_division (0.006, 0, 8.3e-6, 8.3e-6,\
              512, 384, 1024, 768, StartCamPar)
* Camera 0 is located in the origin.
set_camera_setup_cam_param (CameraSetupModelID, 0, [], StartCamPar,\
                            [0, 0, 0, 0, 0, 0, 0])

* Camera 1 is shifted 0.07 m in positive x-direction relative to
* camera 0.
set_camera_setup_cam_param (CameraSetupModelID, 1, [], StartCamPar,\
                            [0.07, 0, 0, 0, 0, 0, 0])

* Camera 2 is shifted 0.1 m in negative y-direction relative to
* camera 0.
set_camera_setup_cam_param (CameraSetupModelID, 2, [], StartCamPar,\
                            [0.0, -0.1, 0, 0, 0, 0, 0])

* There is an object, which is 0.5 away from the origin in
* z-direction, and is facing the origin.
ObjectPose := [0, 0, 0.5, 180, 0, 0, 0]
* Place the setup's origin in the object.
set_camera_setup_param (CameraSetupModelID, 'general', 'coord_transf_pose',\

* Now the camera poses are given relative to the object.
get_camera_setup_param (CameraSetupModelID, 0, 'pose', CamPose0)
* CamPose0 is equivalent to [0.0, 0.0, 0.5, 180.0, 0.0, 0.0, 0]

get_camera_setup_param (CameraSetupModelID, 1, 'pose', CamPose1)
* CamPose1 is equivalent to [0.07, 0.0, 0.5, 180.0, 0.0, 0.0, 0]

get_camera_setup_param (CameraSetupModelID, 2, 'pose', CamPose2)
* CamPose2 is equivalent to [0.0, 0.1, 0.5, 180.0, 0.0, 0.0, 0]

Possible Successors




ClassesClassesClassesClasses | | | | Operators