Skip to content

point_pluecker_line_to_hom_mat3dPointPlueckerLineToHomMat3dPointPlueckerLineToHomMat3dpoint_pluecker_line_to_hom_mat3dT_point_pluecker_line_to_hom_mat3d🔗

Short description🔗

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

Signature🔗

point_pluecker_line_to_hom_mat3d( string TransformationType, point3d.x PointX, point3d.y PointY, point3d.z PointZ, point3d.x LineDirectionX, point3d.y LineDirectionY, point3d.z LineDirectionZ, point3d.x LineMomentX, point3d.y LineMomentY, point3d.z LineMomentZ, out hom_mat3d 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 )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 )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]

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 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)

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

Description🔗

point_pluecker_line_to_hom_mat3dPointPlueckerLineToHomMat3d approximates a 3D affine transformation from 3D point-to-line correspondences and returns it as the homogeneous transformation matrix HomMat3DhomMat3Dhom_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 (PointXpointXpoint_x, PointYpointYpoint_y, PointZpointZpoint_z). The lines are given by their Plücker coordinates \(\mathbf{L}\) (LineDirectionXlineDirectionXline_direction_x, LineDirectionYlineDirectionYline_direction_y, LineDirectionZlineDirectionZline_direction_z) and \(\mathbf{M}\) (LineMomentXlineMomentXline_moment_x, LineMomentYlineMomentYline_moment_y, LineMomentZlineMomentZline_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 TransformationTypetransformationTypetransformation_type. For TransformationTypetransformationTypetransformation_type \(=\) '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_mat3dPointPlueckerLineToHomMat3d 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_mat3dPointPlueckerLineToHomMat3d returns an error.

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

HomMat3DhomMat3Dhom_mat_3d can be used directly with operators that transform 3D data using affine transformations, e.g., affine_trans_point_3dAffineTransPoint3d. To transform lines given in Plücker coordinates, the operator dual_quat_trans_line_3dDualQuatTransLine3d can be used. Here, HomMat3DhomMat3Dhom_mat_3d must be converted into a pose using hom_mat3d_to_poseHomMat3dToPose, the pose must be inverted using pose_invertPoseInvert and then converted into a dual quaternion using pose_to_dual_quatPoseToDualQuat.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

TransformationTypetransformationTypetransformation_type (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Type of the transformation to compute.

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

PointXpointXpoint_x (input_control) point3d.x-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

X coordinate of the original points.

PointYpointYpoint_y (input_control) point3d.y-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Y coordinate of the original points.

PointZpointZpoint_z (input_control) point3d.z-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Z coordinate of the original points.

LineDirectionXlineDirectionXline_direction_x (input_control) point3d.x-array → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Sequence[Union[float, int]]Htuple (double / Hlong)

X component of the direction vector of the corresponding line.

LineDirectionYlineDirectionYline_direction_y (input_control) point3d.y-array → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Sequence[Union[float, int]]Htuple (double / Hlong)

Y component of the direction vector of the corresponding line.

LineDirectionZlineDirectionZline_direction_z (input_control) point3d.z-array → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Sequence[Union[float, int]]Htuple (double / Hlong)

Z component of the direction vector of the corresponding line.

LineMomentXlineMomentXline_moment_x (input_control) point3d.x-array → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Sequence[Union[float, int]]Htuple (double / Hlong)

X component of the moment vector of the corresponding line.

LineMomentYlineMomentYline_moment_y (input_control) point3d.y-array → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Sequence[Union[float, int]]Htuple (double / Hlong)

Y component of the moment vector of the corresponding line.

LineMomentZlineMomentZline_moment_z (input_control) point3d.z-array → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Sequence[Union[float, int]]Htuple (double / Hlong)

Z component of the moment vector of the corresponding line.

HomMat3DhomMat3Dhom_mat_3d (output_control) hom_mat3d → (real)HTuple (double)HHomMat3D, HTuple (double)Sequence[float]Htuple (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)

Combinations with other operators🔗

Combinations

Possible predecessors

get_line_of_sightGetLineOfSight, points_to_pluecker_linePointsToPlueckerLine, point_direction_to_pluecker_linePointDirectionToPlueckerLine

Possible successors

hom_mat3d_to_poseHomMat3dToPose, affine_trans_point_3dAffineTransPoint3d, pose_invertPoseInvert, pose_to_dual_quatPoseToDualQuat, dual_quat_trans_line_3dDualQuatTransLine3d, distance_point_pluecker_lineDistancePointPlueckerLine

See also

vector_to_hom_mat3dVectorToHomMat3d

Module🔗

Foundation