point_pluecker_line_to_hom_mat3dT_point_pluecker_line_to_hom_mat3dPointPlueckerLineToHomMat3dPointPlueckerLineToHomMat3dpoint_pluecker_line_to_hom_mat3d (Operator)

Name

point_pluecker_line_to_hom_mat3dT_point_pluecker_line_to_hom_mat3dPointPlueckerLineToHomMat3dPointPlueckerLineToHomMat3dpoint_pluecker_line_to_hom_mat3d — Approximate a 3D affine transformation from 3D point-to-line correspondences.

Signature

point_pluecker_line_to_hom_mat3d( : : TransformationType, PointX, PointY, PointZ, LineDirectionX, LineDirectionY, LineDirectionZ, LineMomentX, LineMomentY, LineMomentZ : HomMat3D)

Herror T_point_pluecker_line_to_hom_mat3d(const Htuple TransformationType, const Htuple PointX, const Htuple PointY, const Htuple PointZ, const Htuple LineDirectionX, const Htuple LineDirectionY, const Htuple LineDirectionZ, const Htuple LineMomentX, const Htuple LineMomentY, const Htuple LineMomentZ, Htuple* HomMat3D)

void PointPlueckerLineToHomMat3d(const HTuple& TransformationType, const HTuple& PointX, const HTuple& PointY, const HTuple& PointZ, const HTuple& LineDirectionX, const HTuple& LineDirectionY, const HTuple& LineDirectionZ, const HTuple& LineMomentX, const HTuple& LineMomentY, const HTuple& LineMomentZ, HTuple* HomMat3D)

void HHomMat3D::PointPlueckerLineToHomMat3d(const HString& TransformationType, const HTuple& PointX, const HTuple& PointY, const HTuple& PointZ, const HTuple& LineDirectionX, const HTuple& LineDirectionY, const HTuple& LineDirectionZ, const HTuple& LineMomentX, const HTuple& LineMomentY, const HTuple& LineMomentZ)

void HHomMat3D::PointPlueckerLineToHomMat3d(const char* TransformationType, const HTuple& PointX, const HTuple& PointY, const HTuple& PointZ, const HTuple& LineDirectionX, const HTuple& LineDirectionY, const HTuple& LineDirectionZ, const HTuple& LineMomentX, const HTuple& LineMomentY, const HTuple& LineMomentZ)

void HHomMat3D::PointPlueckerLineToHomMat3d(const wchar_t* TransformationType, const HTuple& PointX, const HTuple& PointY, const HTuple& PointZ, const HTuple& LineDirectionX, const HTuple& LineDirectionY, const HTuple& LineDirectionZ, const HTuple& LineMomentX, const HTuple& LineMomentY, const HTuple& LineMomentZ)   (Windows only)

static void HOperatorSet.PointPlueckerLineToHomMat3d(HTuple transformationType, HTuple pointX, HTuple pointY, HTuple pointZ, HTuple lineDirectionX, HTuple lineDirectionY, HTuple lineDirectionZ, HTuple lineMomentX, HTuple lineMomentY, HTuple lineMomentZ, out HTuple homMat3D)

void HHomMat3D.PointPlueckerLineToHomMat3d(string transformationType, HTuple pointX, HTuple pointY, HTuple pointZ, HTuple lineDirectionX, HTuple lineDirectionY, HTuple lineDirectionZ, HTuple lineMomentX, HTuple lineMomentY, HTuple lineMomentZ)

def point_pluecker_line_to_hom_mat3d(transformation_type: str, point_x: Sequence[float], point_y: Sequence[float], point_z: Sequence[float], line_direction_x: Sequence[Union[float, int]], line_direction_y: Sequence[Union[float, int]], line_direction_z: Sequence[Union[float, int]], line_moment_x: Sequence[Union[float, int]], line_moment_y: Sequence[Union[float, int]], line_moment_z: Sequence[Union[float, int]]) -> Sequence[float]

Description

point_pluecker_line_to_hom_mat3dpoint_pluecker_line_to_hom_mat3dPointPlueckerLineToHomMat3dPointPlueckerLineToHomMat3dPointPlueckerLineToHomMat3dpoint_pluecker_line_to_hom_mat3d approximates a 3D affine transformation from 3D point-to-line correspondences and returns it as the homogeneous transformation matrix HomMat3DHomMat3DHomMat3DHomMat3DhomMat3Dhom_mat_3d. The input tuples must be of same length and determine at least 3 point-to-line correspondences. The corresponding points and lines must be at the same index positions in the tuples. The points are given by (PointXPointXPointXPointXpointXpoint_x, PointYPointYPointYPointYpointYpoint_y, PointZPointZPointZPointZpointZpoint_z). The lines are given by their Plücker coordinates (LineDirectionXLineDirectionXLineDirectionXLineDirectionXlineDirectionXline_direction_x, LineDirectionYLineDirectionYLineDirectionYLineDirectionYlineDirectionYline_direction_y, LineDirectionZLineDirectionZLineDirectionZLineDirectionZlineDirectionZline_direction_z) and (LineMomentXLineMomentXLineMomentXLineMomentXlineMomentXline_moment_x, LineMomentYLineMomentYLineMomentYLineMomentYlineMomentYline_moment_y, LineMomentZLineMomentZLineMomentZLineMomentZlineMomentZline_moment_z) For the definition of Plücker coordinates, see “Solution Guide III-C - 3D Vision”.

The type of the 3D transformation to compute is specified with TransformationTypeTransformationTypeTransformationTypeTransformationTypetransformationTypetransformation_type. For TransformationTypeTransformationTypeTransformationTypeTransformationTypetransformationTypetransformation_type = 'rigid'"rigid""rigid""rigid""rigid""rigid", a rigid 3D transformation (a rotation and a translation) is computed. This is the only transformation type that is supported at the moment.

Note that for the minimum number of 3 correspondences, up to 8 valid solutions are possible. point_pluecker_line_to_hom_mat3dpoint_pluecker_line_to_hom_mat3dPointPlueckerLineToHomMat3dPointPlueckerLineToHomMat3dPointPlueckerLineToHomMat3dpoint_pluecker_line_to_hom_mat3d returns an arbitrarily chosen valid solution in this case. If a unique solution is desired, at least 4 correspondences should be specified. Furthermore, note that no well-defined solution exists if all lines are parallel. In this case, point_pluecker_line_to_hom_mat3dpoint_pluecker_line_to_hom_mat3dPointPlueckerLineToHomMat3dPointPlueckerLineToHomMat3dPointPlueckerLineToHomMat3dpoint_pluecker_line_to_hom_mat3d returns an error.

The returned transformation minimizes the sum of the squared orthogonal distances of the points transformed with HomMat3DHomMat3DHomMat3DHomMat3DhomMat3Dhom_mat_3d from their corresponding lines (see distance_point_pluecker_linedistance_point_pluecker_lineDistancePointPlueckerLineDistancePointPlueckerLineDistancePointPlueckerLinedistance_point_pluecker_line).

HomMat3DHomMat3DHomMat3DHomMat3DhomMat3Dhom_mat_3d can be used directly with operators that transform 3D data using affine transformations, e.g., affine_trans_point_3daffine_trans_point_3dAffineTransPoint3dAffineTransPoint3dAffineTransPoint3daffine_trans_point_3d. To transform lines given in Plücker coordinates, the operator dual_quat_trans_line_3ddual_quat_trans_line_3dDualQuatTransLine3dDualQuatTransLine3dDualQuatTransLine3ddual_quat_trans_line_3d can be used. Here, HomMat3DHomMat3DHomMat3DHomMat3DhomMat3Dhom_mat_3d must be converted into a pose using hom_mat3d_to_posehom_mat3d_to_poseHomMat3dToPoseHomMat3dToPoseHomMat3dToPosehom_mat3d_to_pose, the pose must be inverted using pose_invertpose_invertPoseInvertPoseInvertPoseInvertpose_invert and then converted into a dual quaternion using pose_to_dual_quatpose_to_dual_quatPoseToDualQuatPoseToDualQuatPoseToDualQuatpose_to_dual_quat.

Execution Information

Parameters

TransformationTypeTransformationTypeTransformationTypeTransformationTypetransformationTypetransformation_type (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Type of the transformation to compute.

Default value: 'rigid' "rigid" "rigid" "rigid" "rigid" "rigid"

List of values: 'rigid'"rigid""rigid""rigid""rigid""rigid"

PointXPointXPointXPointXpointXpoint_x (input_control)  point3d.x-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

X coordinate of the original points.

PointYPointYPointYPointYpointYpoint_y (input_control)  point3d.y-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Y coordinate of the original points.

PointZPointZPointZPointZpointZpoint_z (input_control)  point3d.z-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Z coordinate of the original points.

LineDirectionXLineDirectionXLineDirectionXLineDirectionXlineDirectionXline_direction_x (input_control)  point3d.x-array HTupleSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

X component of the direction vector of the corresponding line.

LineDirectionYLineDirectionYLineDirectionYLineDirectionYlineDirectionYline_direction_y (input_control)  point3d.y-array HTupleSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Y component of the direction vector of the corresponding line.

LineDirectionZLineDirectionZLineDirectionZLineDirectionZlineDirectionZline_direction_z (input_control)  point3d.z-array HTupleSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Z component of the direction vector of the corresponding line.

LineMomentXLineMomentXLineMomentXLineMomentXlineMomentXline_moment_x (input_control)  point3d.x-array HTupleSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

X component of the moment vector of the corresponding line.

LineMomentYLineMomentYLineMomentYLineMomentYlineMomentYline_moment_y (input_control)  point3d.y-array HTupleSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Y component of the moment vector of the corresponding line.

LineMomentZLineMomentZLineMomentZLineMomentZlineMomentZline_moment_z (input_control)  point3d.z-array HTupleSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Z component of the moment vector of the corresponding line.

HomMat3DHomMat3DHomMat3DHomMat3DhomMat3Dhom_mat_3d (output_control)  hom_mat3d HHomMat3D, HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Output transformation matrix.

Example (HDevelop)

* In this example, we assume that correspondences between points
* (PX, PY, PZ) and Plücker lines (LX, LY, LZ) - (MX, MY, MZ) have
* already been computed.
point_pluecker_line_to_hom_mat3d ('rigid', PX, PY, PZ, LX, LY, LZ, \
                                  MX, MY, MZ, HomMat3D)
hom_mat3d_to_pose (HomMat3D, Pose)
* Compute the residual errors in 3D space, i.e., the distance of the
* points (PX, PY, PZ) transformed by HomMat3D from the lines.
affine_trans_point_3d (HomMat3D, PX, PY, PZ, TPX, TPY, TPZ)
distance_point_pluecker_line (TPX, TPY, TPZ, LX, LY, LZ, \
                              MX, MY, MZ, D)
* The same distance can also be computed by transforming the lines
* instead of the points.  Here, the inverse pose must be used.
pose_invert (Pose, PoseInv)
pose_to_dual_quat (PoseInv, DualQuat)
dual_quat_trans_line_3d (DualQuat, 'moment', LX, LY, LZ, MX, MY, MZ, \
                         TLX, TLY, TLZ, TMX, TMY, TMZ)
distance_point_pluecker_line (PX, PY, PZ, TLX, TLY, TLZ, \
                              TMX, TMY, TMZ, D)

Possible Predecessors

get_line_of_sightget_line_of_sightGetLineOfSightGetLineOfSightGetLineOfSightget_line_of_sight, points_to_pluecker_linepoints_to_pluecker_linePointsToPlueckerLinePointsToPlueckerLinePointsToPlueckerLinepoints_to_pluecker_line, point_direction_to_pluecker_linepoint_direction_to_pluecker_linePointDirectionToPlueckerLinePointDirectionToPlueckerLinePointDirectionToPlueckerLinepoint_direction_to_pluecker_line

Possible Successors

hom_mat3d_to_posehom_mat3d_to_poseHomMat3dToPoseHomMat3dToPoseHomMat3dToPosehom_mat3d_to_pose, affine_trans_point_3daffine_trans_point_3dAffineTransPoint3dAffineTransPoint3dAffineTransPoint3daffine_trans_point_3d, pose_invertpose_invertPoseInvertPoseInvertPoseInvertpose_invert, pose_to_dual_quatpose_to_dual_quatPoseToDualQuatPoseToDualQuatPoseToDualQuatpose_to_dual_quat, dual_quat_trans_line_3ddual_quat_trans_line_3dDualQuatTransLine3dDualQuatTransLine3dDualQuatTransLine3ddual_quat_trans_line_3d, distance_point_pluecker_linedistance_point_pluecker_lineDistancePointPlueckerLineDistancePointPlueckerLineDistancePointPlueckerLinedistance_point_pluecker_line

See also

vector_to_hom_mat3dvector_to_hom_mat3dVectorToHomMat3dVectorToHomMat3dVectorToHomMat3dvector_to_hom_mat3d

Module

Foundation