Image Manager (CVCore3D.dll) 15.0
Point Cloud Transformation

Functions to create new PointCloud objects by transforming their points. More...

Data Structures

struct  CVC3DTransformation
 Affine transformation matrix. More...
 

Typedefs

typedef double CVC3DMatrix[3][3]
 Row-major 3x3 matrix. More...
 
typedef double CVC3DMatrixH[4][4]
 Row-major 4x4 matrix. More...
 
typedef double CVC3DVector[3]
 x, y, z vector. More...
 

Functions

cvbres_t CVC3DAlignToXYPlane (const CVC3DPlane &Plane, CVC3DTransformation &Transformation)
 Calculates a rigid body transformation that maps a specified plane into the xy plane of the global coordinate system. More...
 
cvbres_t CVC3DCreateConvertedPointCloud (CVCOMPOSITE PointCloudIn, cvbval_t Flags, CVCOMPOSITE &PointCloudOut)
 Creates a new point cloud which is a copy from PointCloudIn, but with possibly different cvbdatatype_t and number of components. More...
 
cvbres_t CVC3DCreateScaledPointCloud (CVCOMPOSITE PointCloudIn, CVC3DFactors Factors, CVCOMPOSITE &PointCloudOut)
 Creates a new point cloud with all points being scaled by the given Factors. More...
 
cvbres_t CVC3DCreateTransformedPointCloud (CVCOMPOSITE PointCloudIn, const CVC3DTransformation &AffineTransformation, CVCOMPOSITE &PointCloudOut)
 Creates a new point cloud with all points being transformed by the given AffineTransformation. More...
 
cvbres_t CVC3DCreateTransformedPointCloudH (CVCOMPOSITE PointCloudIn, const CVC3DMatrixH Transformation, CVCOMPOSITE &PointCloudOut)
 Creates a new point cloud with all points being transformed by the given Transformation. More...
 
cvbres_t CVC3DInvertMatrix (const CVC3DMatrix A, CVC3DMatrix AInv)
 Computes the inverse of matrix A, if possible. More...
 
cvbres_t CVC3DInvertTransformation (const CVC3DTransformation &A, CVC3DTransformation &AInv)
 Computes the inverse of the transformation matrix A, if possible. More...
 
cvbres_t CVC3DMatrixDeterminant (const CVC3DMatrix A, double &Determinant)
 Calculates the Determinant of the given matrix A. More...
 
cvbres_t CVC3DMatrixFromRollPitchYawScale (double Roll, double Pitch, double Yaw, CVC3DFactors Scale, CVC3DMatrix TransformationMatrix)
 Computes the transformation matrix M from the given Euler angles Roll, Pitch, Yaw and scaling Scale in x, y, z. More...
 
cvbres_t CVC3DMatrixFromRotationAnglesScale (double Alpha, double Beta, double Gamma, CVC3DFactors Scale, CVC3DMatrix TransformationMatrix)
 Computes the transformation matrix M from the given Euler angles Alpha, Beta, Gamma and scaling Scale in x, y, z. More...
 
cvbres_t CVC3DMultiplyMatrices (const CVC3DMatrix A, const CVC3DMatrix B, CVC3DMatrix R)
 Multiplies two matrices A and B. More...
 
cvbres_t CVC3DMultiplyTransformations (const CVC3DTransformation &A, const CVC3DTransformation &B, CVC3DTransformation &R)
 Multiplies two transformation matrices A and B. More...
 
cvbres_t CVC3DRollPitchYawFromRotationMatrix (const CVC3DMatrix R, double &Roll, double &Pitch, double &Yaw)
 Computes the Euler angles Roll, Pitch and Yaw from the given rotation matrix R. More...
 
cvbres_t CVC3DRollPitchYawScaleFromMatrix (const CVC3DMatrix TransformationMatrix, double &Roll, double &Pitch, double &Yaw, CVC3DFactors &Scale)
 Computes the Euler angles Roll, Pitch, Yaw and the scaling Scale in x, y and z from the given transformation matrix TransformationMatrix. More...
 
cvbres_t CVC3DRollPitchYawScaleFromMatrixApproximation (const CVC3DMatrix TransformationMatrix, double &Roll, double &Pitch, double &Yaw, CVC3DFactors &Scale, double &PrecisionOfApproximation)
 Estimates the Euler angles Roll, Pitch, Yaw and the scaling Scale in x, y and z from the given transformation matrix TransformationMatrix. The transformation matrix may be noisy. More...
 
cvbres_t CVC3DRotationAnglesFromRotationMatrix (const CVC3DMatrix R, double &Alpha, double &Beta, double &Gamma)
 Computes the Euler angles Alpha, Beta and Gamma from the given rotation matrix R. More...
 
cvbres_t CVC3DRotationAnglesScaleFromMatrix (const CVC3DMatrix TransformationMatrix, double &Alpha, double &Beta, double &Gamma, CVC3DFactors &Scale)
 Computes the Euler angles Alpha, Beta, Gamma and the scaling in x, y and z from the given transformation matrix TransformationMatrix. More...
 
cvbres_t CVC3DRotationAnglesScaleFromMatrixApproximation (const CVC3DMatrix TransformationMatrix, double &Alpha, double &Beta, double &Gamma, CVC3DFactors &Scale, double &PrecisionOfApproximation)
 Estimates the Euler angles Alpha, Beta, Gamma and the scaling in x, y and z from the given transformation matrix TransformationMatrix. The transformation matrix may be noisy. More...
 
cvbres_t CVC3DRotationMatrixFromRollPitchYaw (double Roll, double Pitch, double Yaw, CVC3DMatrix R)
 Computes the rotation matrix R from the given Euler angles Roll, Pitch and Yaw. More...
 
cvbres_t CVC3DRotationMatrixFromRotationAngles (double Alpha, double Beta, double Gamma, CVC3DMatrix R)
 Computes the rotation matrix R from the given Euler angles Alpha, Beta and Gamma. More...
 
cvbres_t CVC3DTransformationDeterminant (const CVC3DTransformation &A, double &Determinant)
 Calculates the Determinant of the given transformation matrix A. More...
 
cvbres_t CVC3DTransformPointCloud (CVCOMPOSITE PointCloudIn, const CVC3DTransformation &AffineTransformation, CVCOMPOSITE PointCloudOut)
 Transforms all points in PointCloudIn by the given AffineTransformation and stores them in PointCloudOut. More...
 
cvbres_t CVC3DTransformPointCloudH (CVCOMPOSITE PointCloudIn, const CVC3DMatrixH Transformation, CVCOMPOSITE PointCloudOut)
 Transforms all points in PointCloudIn by the given Transformation and stores them in PointCloudOut. More...
 

Detailed Description

Functions to create new PointCloud objects by transforming their points.

Typedef Documentation

◆ CVC3DMatrix

CVC3DMatrix

Row-major 3x3 matrix.

This matrix is used e.g. in CVC3DTransformation for e.g. scaling or rotation.

Example
Initialize a unit matrix:
for(int row = 0; row < 3; ++row)
{
for(int column = 0; column < 3; ++column)
{
if (row == column)
m[row][column] = 1.0;
else
m[row][column] = 0.0;
}
}
double CVC3DMatrix[3][3]
Row-major 3x3 matrix.
Definition: iCVCore3D.h:22

◆ CVC3DMatrixH

CVC3DMatrixH

Row-major 4x4 matrix.

This matrix is used e.g. in CVC3DTransformPointCloudH for general homography transformation including perspective (pinhole camera model).

Example
Initialize a unit matrix:
for(int row = 0; row < 4; ++row)
{
for(int column = 0; column < 4; ++column)
{
if (row == column)
m[row][column] = 1.0;
else
m[row][column] = 0.0;
}
}
double CVC3DMatrixH[4][4]
Row-major 4x4 matrix.
Definition: iCVCore3D.h:23

◆ CVC3DVector

CVC3DVector

x, y, z vector.

This vector is used e.g. in CVC3DTransformation for translations.

Function Documentation

◆ CVC3DAlignToXYPlane()

cvbres_t CVC3DAlignToXYPlane ( const CVC3DPlane Plane,
CVC3DTransformation Transformation 
)

Calculates a rigid body transformation that maps a specified plane into the xy plane of the global coordinate system.

If a point cloud contains a tilted plane (e.g. representing a conveyer belt), which is not aligned to the xy plane, the following steps should be taken:

  1. Calulate a plane fit on the data using function CVC3DPointCloudCalculatePlaneFromCuboid.
  2. Align the output plane to the xy plane with CVC3DAlignToXYPlane.

Please note the following:

  • The transformation includes only a rotation about x and y axis. The resulting transformation will not contain any rotation about the global Z-axis.
  • The translation to the origin of the global coordinate system is done along z axis.
Parameters
[in]PlanePlane to be aligned.
[out]TransformationCalculated transformation to move given plane to xy plane.
Returns

◆ CVC3DCreateConvertedPointCloud()

cvbres_t CVC3DCreateConvertedPointCloud ( CVCOMPOSITE  PointCloudIn,
cvbval_t  Flags,
CVCOMPOSITE PointCloudOut 
)

Creates a new point cloud which is a copy from PointCloudIn, but with possibly different cvbdatatype_t and number of components.

The given PointCloudIn must have a valid CVC3DPointCloudLayout.

Note
PointCloudOut has the same properties as if a new point cloud was created via CVC3DCreateDuplicatePointCloud. If the Flags result in the same cvbdatatype_t/number of components, this function behaves like CVC3DCreateDuplicatePointCloud.
If this function returns successfully you need to release the returned PointCloudOut via ReleaseObject if not needed anymore.
Parameters
[in]PointCloudInHandle to point cloud object to convert.
[in]FlagsCVC3DPointCloudFlags specifying the kind of point cloud to be created.
[out]PointCloudOutVariable to receive the handle of the resulting point cloud.
Returns
See also
CVC3DCreateSparsePointCloud, CVC3DCreateDuplicatePointCloud.

◆ CVC3DCreateScaledPointCloud()

cvbres_t CVC3DCreateScaledPointCloud ( CVCOMPOSITE  PointCloudIn,
CVC3DFactors  Factors,
CVCOMPOSITE PointCloudOut 
)

Creates a new point cloud with all points being scaled by the given Factors.

The given PointCloudIn must have a valid CVC3DPointCloudLayout.

Note
PointCloudOut has the same properties as if a new point cloud was created via CVC3DCreateDuplicatePointCloud.
If this function returns successfully you need to release the returned PointCloudOut via ReleaseObject if not needed anymore.
Parameters
[in]PointCloudInHandle to point cloud object to scale.
[in]FactorsScale factors to be applied to each point.
[out]PointCloudOutVariable to receive the scaled point cloud.
Returns

◆ CVC3DCreateTransformedPointCloud()

cvbres_t CVC3DCreateTransformedPointCloud ( CVCOMPOSITE  PointCloudIn,
const CVC3DTransformation AffineTransformation,
CVCOMPOSITE PointCloudOut 
)

Creates a new point cloud with all points being transformed by the given AffineTransformation.

The given PointCloudIn must have a valid CVC3DPointCloudLayout.

Note
PointCloudOut has the same properties as if a new point cloud was created via CVC3DCreateDuplicatePointCloud.
If this function returns successfully you need to release the returned PointCloudOut via ReleaseObject if not needed anymore.
Parameters
[in]PointCloudInHandle to point cloud object to be transformed.
[in]AffineTransformationHomogeneous transformation matrix.
[out]PointCloudOutVariable to receive the transformed point cloud.
Returns
See also
CVC3DTransformPointCloudH, CVC3DCreateTransformedPointCloudH, CVC3DTransformPointCloud

◆ CVC3DCreateTransformedPointCloudH()

cvbres_t CVC3DCreateTransformedPointCloudH ( CVCOMPOSITE  PointCloudIn,
const CVC3DMatrixH  Transformation,
CVCOMPOSITE PointCloudOut 
)

Creates a new point cloud with all points being transformed by the given Transformation.

The given PointCloudIn must have a valid CVC3DPointCloudLayout.

Note
PointCloudOut has the same properties as if a new point cloud was created via CVC3DCreateDuplicatePointCloud.
If this function returns successfully you need to release the returned PointCloudOut via ReleaseObject if not needed anymore.
Parameters
[in]PointCloudInHandle to point cloud object to be transformed.
[in]TransformationHomogeneous transformation matrix.
[out]PointCloudOutVariable to receive the transformed point cloud.
Returns
See also
CVC3DTransformPointCloudH, CVC3DCreateTransformedPointCloud, CVC3DTransformPointCloud

◆ CVC3DInvertMatrix()

cvbres_t CVC3DInvertMatrix ( const CVC3DMatrix  A,
CVC3DMatrix  AInv 
)

Computes the inverse of matrix A, if possible.

Inversion is possible if the determinant is not zero.

Parameters
[in]AInput matrix.
[out]AInvMatrix to be filled with the coefficients of the inverted matrix A.
Returns

◆ CVC3DInvertTransformation()

cvbres_t CVC3DInvertTransformation ( const CVC3DTransformation A,
CVC3DTransformation AInv 
)

Computes the inverse of the transformation matrix A, if possible.

Inversion is possible if the determinant is not zero.

Parameters
[in]AInput transformation.
[out]AInvTransformation matrix to be filled with the coefficients of the inverted A.
Returns

◆ CVC3DMatrixDeterminant()

cvbres_t CVC3DMatrixDeterminant ( const CVC3DMatrix  A,
double &  Determinant 
)

Calculates the Determinant of the given matrix A.

Parameters
[in]AMatrix for which the Determinant is to be calculated.
[out]DeterminantVariable to be filled with the determinant.
Returns

◆ CVC3DMatrixFromRollPitchYawScale()

cvbres_t CVC3DMatrixFromRollPitchYawScale ( double  Roll,
double  Pitch,
double  Yaw,
CVC3DFactors  Scale,
CVC3DMatrix  TransformationMatrix 
)

Computes the transformation matrix M from the given Euler angles Roll, Pitch, Yaw and scaling Scale in x, y, z.

This function computes the transformation matrix after the z-y′-x″ convention (see https://en.wikipedia.org/wiki/Euler_angles).
The scaling is applied before rotation:
M = R_z*R_y*R_x*S*xyz
where R_x, R_y, R_z is the rotation around x, y, z
S is the scaling matrix

Parameters
[in]RollAngle around _x_″ in degrees.
[in]PitchAngle around _y_′ axis in degrees.
[in]YawAngle around z axis in degrees.
[in]ScaleScaling factors in x, y and z.
[out]TransformationMatrixNon-nullptr pointer to matrix to be filled with the rotation matrix elements.
Returns
See also
CVC3DRotationMatrixFromRollPitchYaw, CVC3DRollPitchYawScaleFromMatrix

◆ CVC3DMatrixFromRotationAnglesScale()

cvbres_t CVC3DMatrixFromRotationAnglesScale ( double  Alpha,
double  Beta,
double  Gamma,
CVC3DFactors  Scale,
CVC3DMatrix  TransformationMatrix 
)

Computes the transformation matrix M from the given Euler angles Alpha, Beta, Gamma and scaling Scale in x, y, z.

The scaling is applied before rotation:

where
Alpha, Beta, Gamma are the rotation angles around x, y, z
sx, sy, sz are the scaling factors for x, y, z.

Parameters
[in]AlphaAngle around x axis in degrees.
[in]BetaAngle around y axis in degrees.
[in]GammaAngle around z axis in degrees.
[in]ScaleScaling factors in x, y and z.
[out]TransformationMatrixNon-nullptr pointer to matrix to be filled with the rotation matrix elements.
Returns
See also
CVC3DRotationMatrixFromRotationAngles, CVC3DRotationAnglesScaleFromMatrix

◆ CVC3DMultiplyMatrices()

cvbres_t CVC3DMultiplyMatrices ( const CVC3DMatrix  A,
const CVC3DMatrix  B,
CVC3DMatrix  R 
)

Multiplies two matrices A and B.

Parameters
[in]ALeft hand side matrix.
[in]BRight hand side matrix.
[out]RMatrix to be filled with the result coefficients of the operation.
Returns

◆ CVC3DMultiplyTransformations()

cvbres_t CVC3DMultiplyTransformations ( const CVC3DTransformation A,
const CVC3DTransformation B,
CVC3DTransformation R 
)

Multiplies two transformation matrices A and B.

Parameters
[in]ALeft hand side transformation.
[in]BRight hand side transformation.
[out]RTransformation to be filled with the result coefficients of the operation.

◆ CVC3DRollPitchYawFromRotationMatrix()

cvbres_t CVC3DRollPitchYawFromRotationMatrix ( const CVC3DMatrix  R,
double &  Roll,
double &  Pitch,
double &  Yaw 
)

Computes the Euler angles Roll, Pitch and Yaw from the given rotation matrix R.

This function computes the rotation matrix after the z-y′-x″ convention (see https://en.wikipedia.org/wiki/Euler_angles).

Note
If the resulting Pitch is outside the range ]-90° .. 90°[ , the computation of the Euler angles is ambiguous (rotation direction may be inversed).
Parameters
[in]RNon-nullptr pointer to rotation matrix elements.
[out]RollVariable to receive angle around _x_″ in degrees.
[out]PitchVariable to receive angle around _y_′ axis in degrees.
[out]YawVariable to receive angle around z axis in degrees.
Returns
See also
CVC3DRotationMatrixFromRollPitchYaw, CVC3DRollPitchYawScaleFromMatrix

◆ CVC3DRollPitchYawScaleFromMatrix()

cvbres_t CVC3DRollPitchYawScaleFromMatrix ( const CVC3DMatrix  TransformationMatrix,
double &  Roll,
double &  Pitch,
double &  Yaw,
CVC3DFactors Scale 
)

Computes the Euler angles Roll, Pitch, Yaw and the scaling Scale in x, y and z from the given transformation matrix TransformationMatrix.

This function computes the rotation matrix after the z-y′-x″ convention (see https://en.wikipedia.org/wiki/Euler_angles).
The scaling must be applied before rotation:
M = R_z*R_y*R_x*S
where R_x, R_y, R_z is the rotation around x, y, z
S is the scaling matrix

The scaling factors are computed from the normed matrix TransformationMatrix and threfore positive as a start. If the determinant of the normed matrix is -1, the scaling factor in z is set to a negative value.

Note
If one of the resulting angles is outside the range ]-90° .. 90°[ or one of the scaling factors is negative, the computation of the Euler angles and the scaling factors is ambiguous (rotation direction may be inversed, negative scaling is the same as rotation about 180 degree).
Parameters
[in]TransformationMatrixNon-nullptr pointer to transformation matrix elements.
[out]RollVariable to receive angle around _x_″ in degrees.
[out]PitchVariable to receive angle around _y_′ axis in degrees.
[out]YawVariable to receive angle around z axis in degrees.
[out]ScaleScaling factors in x, y and z.
Returns
See also
CVC3DMatrixFromRollPitchYawScale, CVC3DRollPitchYawScaleFromMatrixApproximation, CVC3DRollPitchYawFromRotationMatrix

◆ CVC3DRollPitchYawScaleFromMatrixApproximation()

cvbres_t CVC3DRollPitchYawScaleFromMatrixApproximation ( const CVC3DMatrix  TransformationMatrix,
double &  Roll,
double &  Pitch,
double &  Yaw,
CVC3DFactors Scale,
double &  PrecisionOfApproximation 
)

Estimates the Euler angles Roll, Pitch, Yaw and the scaling Scale in x, y and z from the given transformation matrix TransformationMatrix. The transformation matrix may be noisy.

This function computes the rotation matrix after the z-y′-x″ convention (see https://en.wikipedia.org/wiki/Euler_angles).
The scaling must be applied before rotation:
M = R_z*R_y*R_x*S
where R_x, R_y, R_z is the rotation around x, y, z
S is the scaling matrix

This function should be used, if the matrix is noisy or not a valid transformation matrix.

Rotation angles and scaling factors are estimated using the Nelder-Mead algorithm. Therefore a cost function is set up and minimized over several iterations. The minimum value after the iteration stopped is stored to PrecisionOfApproximation. If the given matrix is valid and not noisy, the PrecisionOfApproximation will be very low.

Attention
This function does not work for large scaling factors or if all scaling factors are negative. In this case the output PrecisionOfApproximation will be large (in general greater 1). Then please norm your matrix first by dividing all matrix elements by a matrix norm (e.g. the Frobenius norm or other).
Note
If one of the resulting angles is outside the range ]-90° .. 90°[ or one of the scaling factors is negative, the computation of the Euler angles and the scaling factors is ambiguous (rotation direction may be inversed, negative scaling is the same as rotation about 180 degree).
Parameters
[in]TransformationMatrixNon-nullptr pointer to transformation matrix elements.
[out]RollVariable to receive angle around _x_″ in degrees.
[out]PitchVariable to receive angle around _y_′ axis in degrees.
[out]YawVariable to receive angle around z axis in degrees.
[out]ScaleScaling factors in x, y and z.
[out]PrecisionOfApproximationPrecision of the approximation.
Returns
See also
CVC3DMatrixFromRollPitchYawScale, CVC3DRollPitchYawScaleFromMatrixApproximation, CVC3DRollPitchYawFromRotationMatrix

◆ CVC3DRotationAnglesFromRotationMatrix()

cvbres_t CVC3DRotationAnglesFromRotationMatrix ( const CVC3DMatrix  R,
double &  Alpha,
double &  Beta,
double &  Gamma 
)

Computes the Euler angles Alpha, Beta and Gamma from the given rotation matrix R.

The rotation matrix R is interpreted as:

where
Alpha, Beta, Gamma are the rotation angles around x, y, z.

Note
If the resulting Beta is outside the range ]-90° .. 90°[ , the computation of the Euler angles is ambiguous (rotation direction may be inversed).
Parameters
[in]RNon-nullptr pointer to rotation matrix elements.
[out]AlphaVariable to receive rotation angle around x axis in degrees.
[out]BetaVariable to receive rotation angle around y axis in degrees.
[out]GammaVariable to receive rotation angle around z axis in degrees.
Returns
See also
CVC3DRotationMatrixFromRotationAngles, CVC3DRotationAnglesScaleFromMatrix

◆ CVC3DRotationAnglesScaleFromMatrix()

cvbres_t CVC3DRotationAnglesScaleFromMatrix ( const CVC3DMatrix  TransformationMatrix,
double &  Alpha,
double &  Beta,
double &  Gamma,
CVC3DFactors Scale 
)

Computes the Euler angles Alpha, Beta, Gamma and the scaling in x, y and z from the given transformation matrix TransformationMatrix.

The transformation matrix M is interpreted as:

where
Alpha, Beta, Gamma are the rotation angles around x, y, z
sx, sy, sz are the scaling factors for x, y, z.

The scaling factors are computed from the normed matrix TransformationMatrix and threfore positive as a start. If the determinant of the normed matrix is -1, the scaling factor in z is set to a negative value.

Note
If one of the resulting angles is outside the range ]-90° .. 90°[ or one of the scaling factors is negative, the computation of the Euler angles and the scaling factors is ambiguous (rotation direction may be inversed, negative scaling is the same as rotation about 180 degree).
Parameters
[in]TransformationMatrixNon-nullptr pointer to transformation matrix elements.
[out]AlphaVariable to receive rotation angle around x axis in degrees.
[out]BetaVariable to receive rotation angle around y axis in degrees.
[out]GammaVariable to receive rotation angle around z axis in degrees.
[out]ScaleScaling factors in x, y and z.
Returns
See also
CVC3DMatrixFromRotationAnglesScale, CVC3DRotationAnglesScaleFromMatrixApproximation, CVC3DRotationAnglesFromRotationMatrix

◆ CVC3DRotationAnglesScaleFromMatrixApproximation()

cvbres_t CVC3DRotationAnglesScaleFromMatrixApproximation ( const CVC3DMatrix  TransformationMatrix,
double &  Alpha,
double &  Beta,
double &  Gamma,
CVC3DFactors Scale,
double &  PrecisionOfApproximation 
)

Estimates the Euler angles Alpha, Beta, Gamma and the scaling in x, y and z from the given transformation matrix TransformationMatrix. The transformation matrix may be noisy.

The transformation matrix M is interpreted as:

where
Alpha, Beta, Gamma are the rotation angles around x, y, z
sx, sy, sz are the scaling factors for x, y, z.

This function should be used, if the matrix is noisy or not a valid transformation matrix.

Rotation angles and scaling factors are estimated using the Nelder-Mead algorithm. Therefore a cost function is set up and minimized over several iterations. The minimum value after the iteration stopped is stored to PrecisionOfApproximation. If the given matrix is valid and not noisy, the PrecisionOfApproximation will be very low.

Attention
This function does not work for large scaling factors or if all scaling factors are negative. In this case the output PrecisionOfApproximation will be large (in general greater 1). Then please norm your matrix first by dividing all matrix elements by a matrix norm (e.g. the Frobenius norm or other).
Note
If one of the resulting angles is outside the range ]-90° .. 90°[ or one of the scaling factors is negative, the computation of the Euler angles and the scaling factors is ambiguous (rotation direction may be inversed, negative scaling is the same as rotation about 180 degree).
Parameters
[in]TransformationMatrixNon-nullptr pointer to transformation matrix elements.
[out]AlphaVariable to receive rotation angle around x axis in degrees.
[out]BetaVariable to receive rotation angle around y axis in degrees.
[out]GammaVariable to receive rotation angle around z axis in degrees.
[out]ScaleScaling factors in x, y and z.
[out]PrecisionOfApproximationPrecision of the approximation.
Returns
See also
CVC3DMatrixFromRotationAnglesScale, CVC3DRotationAnglesScaleFromMatrixApproximation, CVC3DRotationAnglesFromRotationMatrix

◆ CVC3DRotationMatrixFromRollPitchYaw()

cvbres_t CVC3DRotationMatrixFromRollPitchYaw ( double  Roll,
double  Pitch,
double  Yaw,
CVC3DMatrix  R 
)

Computes the rotation matrix R from the given Euler angles Roll, Pitch and Yaw.

This function computes the rotation matrix after the z-y′-x″ convention (see https://en.wikipedia.org/wiki/Euler_angles).

Parameters
[in]RollAngle around _x_″ in degrees.
[in]PitchAngle around _y_′ axis in degrees.
[in]YawAngle around z axis in degrees.
[out]RNon-nullptr pointer to matrix to be filled with the rotation matrix elements.
Returns
See also
CVC3DRollPitchYawFromRotationMatrix, CVC3DMatrixFromRollPitchYawScale

◆ CVC3DRotationMatrixFromRotationAngles()

cvbres_t CVC3DRotationMatrixFromRotationAngles ( double  Alpha,
double  Beta,
double  Gamma,
CVC3DMatrix  R 
)

Computes the rotation matrix R from the given Euler angles Alpha, Beta and Gamma.

The rotation matrix R is computed via:

where
Alpha, Beta, Gamma are the rotation angles around x, y, z.

Parameters
[in]AlphaAngle around x axis in degrees.
[in]BetaAngle around y axis in degrees.
[in]GammaAngle around z axis in degrees.
[out]RNon-nullptr pointer to matrix to be filled with the rotation matrix elements.
Returns
See also
CVC3DRotationAnglesFromRotationMatrix, CVC3DMatrixFromRotationAnglesScale

◆ CVC3DTransformationDeterminant()

cvbres_t CVC3DTransformationDeterminant ( const CVC3DTransformation A,
double &  Determinant 
)

Calculates the Determinant of the given transformation matrix A.

Parameters
[in]ATransformation for which the Determinant is to be calculated.
[out]DeterminantVariable to be filled with the determinant.
Returns
Always CVC_ERROR (CVC_E_OK).

◆ CVC3DTransformPointCloud()

cvbres_t CVC3DTransformPointCloud ( CVCOMPOSITE  PointCloudIn,
const CVC3DTransformation AffineTransformation,
CVCOMPOSITE  PointCloudOut 
)

Transforms all points in PointCloudIn by the given AffineTransformation and stores them in PointCloudOut.

The given PointCloudIn and PointCloudOut must have valid CVC3DPointCloudLayout.

Note
This operation also allows in-place transformation: PointCloudOut is PointCloudIn.
Parameters
[in]PointCloudInHandle to point cloud object to be transformed.
[in]AffineTransformationHomogeneous transformation matrix.
[in]PointCloudOutHandle to sparse point cloud were the transformed points are stored in.
Returns
See also
CVC3DTransformPointCloudH, CVC3DCreateTransformedPointCloud, CVC3DCreateTransformedPointCloudH

◆ CVC3DTransformPointCloudH()

cvbres_t CVC3DTransformPointCloudH ( CVCOMPOSITE  PointCloudIn,
const CVC3DMatrixH  Transformation,
CVCOMPOSITE  PointCloudOut 
)

Transforms all points in PointCloudIn by the given Transformation and stores them in PointCloudOut.

The given PointCloudIn and PointCloudOut must have valid CVC3DPointCloudLayout.

Note
This operation also allows in-place transformation: PointCloudOut is PointCloudIn.
Parameters
[in]PointCloudInHandle to point cloud object to be transformed.
[in]TransformationHomogeneous transformation matrix.
[in]PointCloudOutHandle to sparse point cloud were the transformed points are stored in.
Returns
See also
CVC3DTransformPointCloudH, CVC3DCreateTransformedPointCloud, CVC3DCreateTransformedPointCloudH