ClassesClassesClassesClasses | | | | Operators

create_cam_pose_look_at_pointT_create_cam_pose_look_at_pointCreateCamPoseLookAtPointcreate_cam_pose_look_at_pointCreateCamPoseLookAtPointCreateCamPoseLookAtPoint (Operator)

Name

create_cam_pose_look_at_pointT_create_cam_pose_look_at_pointCreateCamPoseLookAtPointcreate_cam_pose_look_at_pointCreateCamPoseLookAtPointCreateCamPoseLookAtPoint — Create a 3D camera pose from camera center and viewing direction.

Signature

create_cam_pose_look_at_point( : : CamPosX, CamPosY, CamPosZ, LookAtX, LookAtY, LookAtZ, RefPlaneNormal, CamRoll : CamPose)

Herror T_create_cam_pose_look_at_point(const Htuple CamPosX, const Htuple CamPosY, const Htuple CamPosZ, const Htuple LookAtX, const Htuple LookAtY, const Htuple LookAtZ, const Htuple RefPlaneNormal, const Htuple CamRoll, Htuple* CamPose)

Herror create_cam_pose_look_at_point(const HTuple& CamPosX, const HTuple& CamPosY, const HTuple& CamPosZ, const HTuple& LookAtX, const HTuple& LookAtY, const HTuple& LookAtZ, const HTuple& RefPlaneNormal, const HTuple& CamRoll, HTuple* CamPose)

void CreateCamPoseLookAtPoint(const HTuple& CamPosX, const HTuple& CamPosY, const HTuple& CamPosZ, const HTuple& LookAtX, const HTuple& LookAtY, const HTuple& LookAtZ, const HTuple& RefPlaneNormal, const HTuple& CamRoll, HTuple* CamPose)

void HPose::CreateCamPoseLookAtPoint(const HTuple& CamPosX, const HTuple& CamPosY, const HTuple& CamPosZ, const HTuple& LookAtX, const HTuple& LookAtY, const HTuple& LookAtZ, const HTuple& RefPlaneNormal, const HTuple& CamRoll)

void HPose::CreateCamPoseLookAtPoint(double CamPosX, double CamPosY, double CamPosZ, double LookAtX, double LookAtY, double LookAtZ, const HString& RefPlaneNormal, double CamRoll)

void HPose::CreateCamPoseLookAtPoint(double CamPosX, double CamPosY, double CamPosZ, double LookAtX, double LookAtY, double LookAtZ, const char* RefPlaneNormal, double CamRoll)

void HOperatorSetX.CreateCamPoseLookAtPoint(
[in] VARIANT CamPosX, [in] VARIANT CamPosY, [in] VARIANT CamPosZ, [in] VARIANT LookAtX, [in] VARIANT LookAtY, [in] VARIANT LookAtZ, [in] VARIANT RefPlaneNormal, [in] VARIANT CamRoll, [out] VARIANT* CamPose)

VARIANT HPoseX.CreateCamPoseLookAtPoint(
[in] VARIANT CamPosX, [in] VARIANT CamPosY, [in] VARIANT CamPosZ, [in] VARIANT LookAtX, [in] VARIANT LookAtY, [in] VARIANT LookAtZ, [in] VARIANT RefPlaneNormal, [in] VARIANT CamRoll)

static void HOperatorSet.CreateCamPoseLookAtPoint(HTuple camPosX, HTuple camPosY, HTuple camPosZ, HTuple lookAtX, HTuple lookAtY, HTuple lookAtZ, HTuple refPlaneNormal, HTuple camRoll, out HTuple camPose)

void HPose.CreateCamPoseLookAtPoint(HTuple camPosX, HTuple camPosY, HTuple camPosZ, HTuple lookAtX, HTuple lookAtY, HTuple lookAtZ, HTuple refPlaneNormal, HTuple camRoll)

void HPose.CreateCamPoseLookAtPoint(double camPosX, double camPosY, double camPosZ, double lookAtX, double lookAtY, double lookAtZ, string refPlaneNormal, double camRoll)

Description

The operator create_cam_pose_look_at_pointcreate_cam_pose_look_at_pointCreateCamPoseLookAtPointcreate_cam_pose_look_at_pointCreateCamPoseLookAtPointCreateCamPoseLookAtPoint creates a 3D camera pose with respect to a world coordinate system based on two points and the camera roll angle.

The first of the two points defines the position of the optical center of the camera in the world coordinate system, i.e., the origin of the camera coordinate system. It is given by its three coordinates CamPosXCamPosXCamPosXCamPosXCamPosXcamPosX, CamPosYCamPosYCamPosYCamPosYCamPosYcamPosY, and CamPosZCamPosZCamPosZCamPosZCamPosZcamPosZ. The second of the two points defines the viewing direction of the camera. It represents the point in the world coordinate system at which the camera is to look. It is also specified by its three coordinates LookAtXLookAtXLookAtXLookAtXLookAtXlookAtX, LookAtYLookAtYLookAtYLookAtYLookAtYlookAtY, and LookAtZLookAtZLookAtZLookAtZLookAtZlookAtZ. Consequently, the second point lies on the z axis of the camera coordinate system.

Finally, the remaining degree of freedom to be specified is a rotation of the camera around its z axis, i.e., the roll angle of the camera. To determine this rotation, the normal of a reference plane can be specified in RefPlaneNormalRefPlaneNormalRefPlaneNormalRefPlaneNormalRefPlaneNormalrefPlaneNormal, which defines the reference orientation of the camera. Finally, the camera roll angle can be specified in CamRollCamRollCamRollCamRollCamRollcamRoll, which describes a rotation of the camera around its z axis with respect to its reference orientation.

The reference plane can be seen as a plane in the world coordinate system that is parallel to the x axis of the camera (in its reference orientation, i.e., with a roll angle of 0). In an alternative interpretation, the normal vector of the reference plane projected onto the image plane points upwards, i.e., it is mapped to the negative y axis of the camera coordinate system. The parameter RefPlaneNormalRefPlaneNormalRefPlaneNormalRefPlaneNormalRefPlaneNormalrefPlaneNormal may take one of the following values:

'x'"x""x""x""x""x":

The reference plane is the yz plane of the world coordinate system. The projected x axis of the world coordinate system points upwards in the image plane.

'-x'"-x""-x""-x""-x""-x":

The reference plane is the yz plane of the world coordinate system. The projected x axis of the world coordinate system points downwards in the image plane.

'y'"y""y""y""y""y":

The reference plane is the xz plane of the world coordinate system. The projected y axis of the world coordinate system points upwards in the image plane.

'-y'"-y""-y""-y""-y""-y":

The reference plane is the xz plane of the world coordinate system. The projected y axis of the world coordinate system points downwards in the image plane.

'z'"z""z""z""z""z":

The reference plane is the xy plane of the world coordinate system. The projected z axis of the world coordinate system points upwards in the image plane.

'-z'"-z""-z""-z""-z""-z":

The reference plane is the xy plane of the world coordinate system. The projected z axis of the world coordinate system points downwards in the image plane.

Alternatively to the above values, an arbitrary normal vector can be specified in RefPlaneNormalRefPlaneNormalRefPlaneNormalRefPlaneNormalRefPlaneNormalrefPlaneNormal, which is not restricted to the coordinate axes. For this, a tuple of three values representing the three components of the normal vector must be passed.

Note that the position of the optical center and the point at which the camera looks must differ from each other. Furthermore, the normal vector of the reference plane and the z axis of the camera must not be parallel. Otherwise, the camera pose is not well-defined.

create_cam_pose_look_at_pointcreate_cam_pose_look_at_pointCreateCamPoseLookAtPointcreate_cam_pose_look_at_pointCreateCamPoseLookAtPointCreateCamPoseLookAtPoint is particularly useful if a 3D object model or a 3D shape model should be visualized from a certain camera position. In this case, the pose that is created by create_cam_pose_look_at_pointcreate_cam_pose_look_at_pointCreateCamPoseLookAtPointcreate_cam_pose_look_at_pointCreateCamPoseLookAtPointCreateCamPoseLookAtPoint can be passed to project_object_model_3dproject_object_model_3dProjectObjectModel3dproject_object_model_3dProjectObjectModel3dProjectObjectModel3d or project_shape_model_3dproject_shape_model_3dProjectShapeModel3dproject_shape_model_3dProjectShapeModel3dProjectShapeModel3d, respectively.

It is also possible to pass tuples of different length for different input parameters. In this case, internally the maximum number of parameter values over all input control parameters is computed. This number is taken as the number of output camera poses. Then, all input parameters can contain a single value or the same number of values as output camera poses. In the first case, the single value is used for the computation of all camera poses, while in the second case the respective value of the element in the parameter is used for the computation of the corresponding camera pose.

Parallelization

Parameters

CamPosXCamPosXCamPosXCamPosXCamPosXcamPosX (input_control)  real(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

X coordinate of the optical center of the camera.

CamPosYCamPosYCamPosYCamPosYCamPosYcamPosY (input_control)  real(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Y coordinate of the optical center of the camera.

CamPosZCamPosZCamPosZCamPosZCamPosZcamPosZ (input_control)  real(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Z coordinate of the optical center of the camera.

LookAtXLookAtXLookAtXLookAtXLookAtXlookAtX (input_control)  real(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

X coordinate of the 3D point to which the camera is directed.

LookAtYLookAtYLookAtYLookAtYLookAtYlookAtY (input_control)  real(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Y coordinate of the 3D point to which the camera is directed.

LookAtZLookAtZLookAtZLookAtZLookAtZlookAtZ (input_control)  real(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Z coordinate of the 3D point to which the camera is directed.

RefPlaneNormalRefPlaneNormalRefPlaneNormalRefPlaneNormalRefPlaneNormalrefPlaneNormal (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string / real) (string / double) (HString / double) (char* / double) (BSTR / double) (char* / double)

Normal vector of the reference plane (points up).

Default value: '-y' "-y" "-y" "-y" "-y" "-y"

List of values: '-x'"-x""-x""-x""-x""-x", '-y'"-y""-y""-y""-y""-y", '-z'"-z""-z""-z""-z""-z", 'x'"x""x""x""x""x", 'y'"y""y""y""y""y", 'z'"z""z""z""z""z"

CamRollCamRollCamRollCamRollCamRollcamRoll (input_control)  angle.rad(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Camera roll angle.

Default value: 0

CamPoseCamPoseCamPoseCamPoseCamPosecamPose (output_control)  pose HPose, HTupleHTupleHTupleHPoseX, VARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

3D camera pose.

Result

If the parameters are valid, the operator create_cam_pose_look_at_pointcreate_cam_pose_look_at_pointCreateCamPoseLookAtPointcreate_cam_pose_look_at_pointCreateCamPoseLookAtPointCreateCamPoseLookAtPoint returns the value 2 (H_MSG_TRUE). If necessary an exception is raised. If the parameters are chosen such that the pose is not well defined, the error 8940 is raised.

Possible Predecessors

convert_point_3d_spher_to_cartconvert_point_3d_spher_to_cartConvertPoint3dSpherToCartconvert_point_3d_spher_to_cartConvertPoint3dSpherToCartConvertPoint3dSpherToCart

Alternatives

create_posecreate_poseCreatePosecreate_poseCreatePoseCreatePose

Module

3D Metrology


ClassesClassesClassesClasses | | | | Operators