Skip to content

affine_trans_object_model_3daffine_trans_object_model_3dAffineTransObjectModel3dAffineTransObjectModel3daffine_trans_object_model_3dT_affine_trans_object_model_3d🔗

Short description🔗

affine_trans_object_model_3daffine_trans_object_model_3dAffineTransObjectModel3dAffineTransObjectModel3daffine_trans_object_model_3dT_affine_trans_object_model_3d — Apply an arbitrary affine 3D transformation to 3D object models.

Signature🔗

affine_trans_object_model_3d( object_model_3d ObjectModel3D, hom_mat3d HomMat3D, out object_model_3d ObjectModel3DAffineTrans )affine_trans_object_model_3d( : : ObjectModel3D, HomMat3D : ObjectModel3DAffineTrans )void AffineTransObjectModel3d( const HTuple& ObjectModel3D, const HTuple& HomMat3D, HTuple* ObjectModel3DAffineTrans )static void HOperatorSet.AffineTransObjectModel3d( HTuple objectModel3D, HTuple homMat3D, out HTuple objectModel3DAffineTrans )def affine_trans_object_model_3d( object_model_3d: MaybeSequence[HHandle], hom_mat_3d: Sequence[float] ) -> Sequence[HHandle]

def affine_trans_object_model_3d_s( object_model_3d: MaybeSequence[HHandle], hom_mat_3d: Sequence[float] ) -> HHandleHerror T_affine_trans_object_model_3d( const Htuple ObjectModel3D, const Htuple HomMat3D, Htuple* ObjectModel3DAffineTrans )

static HObjectModel3DArray HObjectModel3D::AffineTransObjectModel3d( const HObjectModel3DArray& ObjectModel3D, const HHomMat3DArray& HomMat3D )

HObjectModel3D HObjectModel3D::AffineTransObjectModel3d( const HHomMat3D& HomMat3D ) const

static HObjectModel3D[] HObjectModel3D.AffineTransObjectModel3d( HObjectModel3D[] objectModel3D, HHomMat3D[] homMat3D )

HObjectModel3D HObjectModel3D.AffineTransObjectModel3d( HHomMat3D homMat3D )

Description🔗

affine_trans_object_model_3dAffineTransObjectModel3d applies arbitrary affine 3D transformations, i.e., scaling, rotation, and translation, to 3D object models and returns the handles of the transformed 3D object models. The affine transformations are described by the homogeneous transformation matrices given in HomMat3DhomMat3Dhom_mat_3d.

The transformation matrices can be created using the operators hom_mat3d_identityHomMat3dIdentity, hom_mat3d_scaleHomMat3dScale, hom_mat3d_rotateHomMat3dRotate, hom_mat3d_translateHomMat3dTranslate, etc., or it can be the result of pose_to_hom_mat3dPoseToHomMat3d (see affine_trans_point_3dAffineTransPoint3d).

In general, the operator affine_trans_object_model_3dAffineTransObjectModel3d is not necessary in the context of shape based 3D matching. Instead, if a rotation of the 3D object model into a reference orientation should be performed, appropriate values for the parameters RefRotXrefRotXref_rot_x, RefRotYrefRotYref_rot_y, RefRotZrefRotZref_rot_z, and OrderOfRotationorderOfRotationorder_of_rotation should be passed to the operator create_shape_model_3dCreateShapeModel3d.

affine_trans_object_model_3dAffineTransObjectModel3d transforms one or more 3D object models with the same transformation matrix if only one transformation matrix is passed in HomMat3DhomMat3Dhom_mat_3d (N:1). If a single 3D object model is passed in ObjectModel3DobjectModel3Dobject_model_3d, it is transformed with all passed transformation matrices (1:N). If the number of transformation matrices corresponds to the number of 3D object models, every 3D object model is transformed individually with the respective transformation matrix (N:N). In those cases, N can be zero, i.e., no matrix or no 3D object model can be passed to the operator. In this case, an empty tuple is returned in ObjectModel3DAffineTransobjectModel3DAffineTransobject_model_3daffine_trans. This can be used to, for example, transform the results of other operators without checking first if at least one matrix was returned.

Attention🔗

affine_trans_object_model_3dAffineTransObjectModel3d transforms the attributes of type 3D points, 3D point normals, and the prepared shape model for shape-based 3D matching. Primitives and precomputed data structures for 3D distance computation are not copied. All other attributes are copied without modification. To transform 3D primitives, the operator rigid_trans_object_model_3dRigidTransObjectModel3d must be used.

Execution information🔗

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

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

  • Automatically parallelized on internal data level.

Parameters🔗

ObjectModel3DobjectModel3Dobject_model_3d (input_control) object_model_3d(-array) → (handle)(handle)HTuple (HHandle)HObjectModel3D, HTuple (IntPtr)MaybeSequence[HHandle]Htuple (handle)

Handles of the 3D object models.

HomMat3DhomMat3Dhom_mat_3d (input_control) hom_mat3d(-array) → (real)(real)HTuple (double)HHomMat3D, HTuple (double)Sequence[float]Htuple (double)

Transformation matrices.

ObjectModel3DAffineTransobjectModel3DAffineTransobject_model_3daffine_trans (output_control) object_model_3d(-array) → (handle)(handle)HTuple (HHandle)HObjectModel3D, HTuple (IntPtr)Sequence[HHandle]Htuple (handle)

Handles of the transformed 3D object models.

Result🔗

affine_trans_object_model_3dAffineTransObjectModel3d returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

read_object_model_3dReadObjectModel3d, xyz_to_object_model_3dXyzToObjectModel3d

Possible successors

project_object_model_3dProjectObjectModel3d, object_model_3d_to_xyzObjectModel3dToXyz

See also

affine_trans_point_3dAffineTransPoint3d, rigid_trans_object_model_3dRigidTransObjectModel3d, projective_trans_object_model_3dProjectiveTransObjectModel3d

Module🔗

3D Metrology