point_pluecker_line_to_hom_mat3d T_point_pluecker_line_to_hom_mat3d PointPlueckerLineToHomMat3d PointPlueckerLineToHomMat3d point_pluecker_line_to_hom_mat3d (Operator)
Name
point_pluecker_line_to_hom_mat3d T_point_pluecker_line_to_hom_mat3d PointPlueckerLineToHomMat3d PointPlueckerLineToHomMat3d point_pluecker_line_to_hom_mat3d
— Approximate a 3D affine transformation from 3D point-to-line
correspondences.
Signature
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_mat3d point_pluecker_line_to_hom_mat3d PointPlueckerLineToHomMat3d PointPlueckerLineToHomMat3d PointPlueckerLineToHomMat3d point_pluecker_line_to_hom_mat3d
approximates a 3D affine
transformation from 3D point-to-line correspondences and returns it
as the homogeneous transformation matrix HomMat3D HomMat3D HomMat3D HomMat3D homMat3D hom_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
(PointX PointX PointX PointX pointX point_x
, PointY PointY PointY PointY pointY point_y
, PointZ PointZ PointZ PointZ pointZ point_z
).
The lines are given by their Plücker coordinates
(LineDirectionX LineDirectionX LineDirectionX LineDirectionX lineDirectionX line_direction_x
, LineDirectionY LineDirectionY LineDirectionY LineDirectionY lineDirectionY line_direction_y
, LineDirectionZ LineDirectionZ LineDirectionZ LineDirectionZ lineDirectionZ line_direction_z
)
and
(LineMomentX LineMomentX LineMomentX LineMomentX lineMomentX line_moment_x
, LineMomentY LineMomentY LineMomentY LineMomentY lineMomentY line_moment_y
, LineMomentZ LineMomentZ LineMomentZ LineMomentZ lineMomentZ line_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
TransformationType TransformationType TransformationType TransformationType transformationType transformation_type
.
For TransformationType TransformationType TransformationType TransformationType transformationType transformation_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_mat3d point_pluecker_line_to_hom_mat3d PointPlueckerLineToHomMat3d PointPlueckerLineToHomMat3d PointPlueckerLineToHomMat3d point_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_mat3d point_pluecker_line_to_hom_mat3d PointPlueckerLineToHomMat3d PointPlueckerLineToHomMat3d PointPlueckerLineToHomMat3d point_pluecker_line_to_hom_mat3d
returns
an error.
The returned transformation minimizes the sum of the squared
orthogonal distances of the points transformed with
HomMat3D HomMat3D HomMat3D HomMat3D homMat3D hom_mat_3d
from their corresponding lines
(see distance_point_pluecker_line distance_point_pluecker_line DistancePointPlueckerLine DistancePointPlueckerLine DistancePointPlueckerLine distance_point_pluecker_line
).
HomMat3D HomMat3D HomMat3D HomMat3D homMat3D hom_mat_3d
can be used directly with operators that transform
3D data using affine transformations, e.g., affine_trans_point_3d affine_trans_point_3d AffineTransPoint3d AffineTransPoint3d AffineTransPoint3d affine_trans_point_3d
.
To transform lines given in Plücker coordinates, the operator
dual_quat_trans_line_3d dual_quat_trans_line_3d DualQuatTransLine3d DualQuatTransLine3d DualQuatTransLine3d dual_quat_trans_line_3d
can be used.
Here, HomMat3D HomMat3D HomMat3D HomMat3D homMat3D hom_mat_3d
must be converted into a pose using
hom_mat3d_to_pose hom_mat3d_to_pose HomMat3dToPose HomMat3dToPose HomMat3dToPose hom_mat3d_to_pose
, the pose must be inverted using
pose_invert pose_invert PoseInvert PoseInvert PoseInvert pose_invert
and then converted into a dual quaternion using
pose_to_dual_quat pose_to_dual_quat PoseToDualQuat PoseToDualQuat PoseToDualQuat pose_to_dual_quat
.
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
TransformationType TransformationType TransformationType TransformationType transformationType transformation_type
(input_control) string →
HTuple str HTuple Htuple (string) (string ) (HString ) (char* )
Type of the transformation to compute.
Default:
'rigid'
"rigid"
"rigid"
"rigid"
"rigid"
"rigid"
List of values:
'rigid' "rigid" "rigid" "rigid" "rigid" "rigid"
PointX PointX PointX PointX pointX point_x
(input_control) point3d.x-array →
HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
X coordinate of the original points.
PointY PointY PointY PointY pointY point_y
(input_control) point3d.y-array →
HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Y coordinate of the original points.
PointZ PointZ PointZ PointZ pointZ point_z
(input_control) point3d.z-array →
HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Z coordinate of the original points.
LineDirectionX LineDirectionX LineDirectionX LineDirectionX lineDirectionX line_direction_x
(input_control) point3d.x-array →
HTuple Sequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
X component of the direction vector of the corresponding
line.
LineDirectionY LineDirectionY LineDirectionY LineDirectionY lineDirectionY line_direction_y
(input_control) point3d.y-array →
HTuple Sequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Y component of the direction vector of the corresponding
line.
LineDirectionZ LineDirectionZ LineDirectionZ LineDirectionZ lineDirectionZ line_direction_z
(input_control) point3d.z-array →
HTuple Sequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Z component of the direction vector of the corresponding
line.
LineMomentX LineMomentX LineMomentX LineMomentX lineMomentX line_moment_x
(input_control) point3d.x-array →
HTuple Sequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
X component of the moment vector of the corresponding
line.
LineMomentY LineMomentY LineMomentY LineMomentY lineMomentY line_moment_y
(input_control) point3d.y-array →
HTuple Sequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Y component of the moment vector of the corresponding
line.
LineMomentZ LineMomentZ LineMomentZ LineMomentZ lineMomentZ line_moment_z
(input_control) point3d.z-array →
HTuple Sequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Z component of the moment vector of the corresponding
line.
HomMat3D HomMat3D HomMat3D HomMat3D homMat3D hom_mat_3d
(output_control) hom_mat3d →
HHomMat3D , HTuple Sequence[float] HTuple Htuple (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_sight get_line_of_sight GetLineOfSight GetLineOfSight GetLineOfSight get_line_of_sight
,
points_to_pluecker_line points_to_pluecker_line PointsToPlueckerLine PointsToPlueckerLine PointsToPlueckerLine points_to_pluecker_line
,
point_direction_to_pluecker_line point_direction_to_pluecker_line PointDirectionToPlueckerLine PointDirectionToPlueckerLine PointDirectionToPlueckerLine point_direction_to_pluecker_line
Possible Successors
hom_mat3d_to_pose hom_mat3d_to_pose HomMat3dToPose HomMat3dToPose HomMat3dToPose hom_mat3d_to_pose
,
affine_trans_point_3d affine_trans_point_3d AffineTransPoint3d AffineTransPoint3d AffineTransPoint3d affine_trans_point_3d
,
pose_invert pose_invert PoseInvert PoseInvert PoseInvert pose_invert
,
pose_to_dual_quat pose_to_dual_quat PoseToDualQuat PoseToDualQuat PoseToDualQuat pose_to_dual_quat
,
dual_quat_trans_line_3d dual_quat_trans_line_3d DualQuatTransLine3d DualQuatTransLine3d DualQuatTransLine3d dual_quat_trans_line_3d
,
distance_point_pluecker_line distance_point_pluecker_line DistancePointPlueckerLine DistancePointPlueckerLine DistancePointPlueckerLine distance_point_pluecker_line
See also
vector_to_hom_mat3d vector_to_hom_mat3d VectorToHomMat3d VectorToHomMat3d VectorToHomMat3d vector_to_hom_mat3d
Module
Foundation