Documentation of 'georegression.geometry.ConvertRotation3D_F32' Java class
ConvertRotation3D_F32
georegression.geometry

Class ConvertRotation3D_F32



  • public class ConvertRotation3D_F32
    extends java.lang.Object
    Provides functions to convert between different parameterizations of 3D rotation matrices.
    • Constructor Detail

      • ConvertRotation3D_F32

        public ConvertRotation3D_F32()
    • Method Detail

      • rodriguesToMatrix

        public static org.ejml.data.DenseMatrix64F rodriguesToMatrix(Rodrigues_F32 rodrigues,
                                                                     org.ejml.data.DenseMatrix64F R)
        Converts Rodrigues_F32 into a rotation matrix.
        Parameters:
        rodrigues - rotation defined using rotation axis angle notation.
        R - where the results will be stored. If null a new matrix is declared/
        Returns:
        rotation matrix.
      • rodriguesToEuler

        public static float[] rodriguesToEuler(Rodrigues_F32 rodrigues,
                                               EulerType type,
                                               float[] euler)

        ConvertsRodrigues_F32 into an euler rotation of different types

        Parameters:
        rodrigues - rotation defined using rotation axis angle notation.
        type - Type of Euler rotation
        euler - (Output) Optional storage for Euler rotation
        Returns:
        The Euler rotation.
      • rodriguesToQuaternion

        public static Quaternion_F32 rodriguesToQuaternion(Rodrigues_F32 rodrigues,
                                                           Quaternion_F32 quat)

        Converts Rodrigues_F32 into a unit Quaternion_F32.

        Parameters:
        rodrigues - The angle of rotation around the rotation axis.
        quat - Storage for quaternion coordinate. If null a new quaternion is created. Modified.
        Returns:
        unit quaternion coordinate.
      • quaternionToEuler

        public static float[] quaternionToEuler(Quaternion_F32 q,
                                                EulerType type,
                                                float[] euler)

        Converts a quaternion into an euler rotation of different types

        Parameters:
        q - (Input) Normalized quaternion. Not modified.
        type - Type of Euler rotation
        euler - (Output) Optional storage for Euler rotation
        Returns:
        The Euler rotation.
      • matrixToEuler

        public static float[] matrixToEuler(org.ejml.data.DenseMatrix64F R,
                                            EulerType type,
                                            float[] euler)

        Converts a rotation matrix into an Euler angle of different types

        Parameters:
        R - (Input) Rotation matrix. Not modified.
        type - Type of Euler rotation
        euler - (Output) Optional storage for Euler rotation
        Returns:
        The Euler rotation.
      • matrixToQuaternion

        public static Quaternion_F32 matrixToQuaternion(org.ejml.data.DenseMatrix64F R,
                                                        Quaternion_F32 quat)
        Extracts quaternions from the provided rotation matrix.
        Parameters:
        R - (Input) rotation matrix
        quat - (Output) Optional storage for quaternion. If null a new class will be used.
        Returns:
        unit quaternion representation of the rotation matrix.
      • matrixToRodrigues

        public static Rodrigues_F32 matrixToRodrigues(org.ejml.data.DenseMatrix64F R,
                                                      Rodrigues_F32 rodrigues)
        Converts a rotation matrix into Rodrigues_F32.
        Parameters:
        R - Rotation matrix.
        rodrigues - Storage used for solution. If null a new instance is declared.
        Returns:
        The found axis and rotation angle.
      • rotX

        public static org.ejml.data.DenseMatrix64F rotX(float ang,
                                                        org.ejml.data.DenseMatrix64F R)
        Creates a rotation matrix about the x-axis.
        Parameters:
        ang - the angle it rotates a point by in radians.
        R - (Output) Optional storage for rotation matrix. Modified.
        Returns:
        The 3 by 3 rotation matrix.
      • setRotX

        public static void setRotX(float ang,
                                   org.ejml.data.DenseMatrix64F R)
        Sets the values in the specified matrix to a rotation matrix about the x-axis.
        Parameters:
        ang - the angle it rotates a point by in radians.
        R - (Output) Storage for rotation matrix. Modified.
      • rotY

        public static org.ejml.data.DenseMatrix64F rotY(float ang,
                                                        org.ejml.data.DenseMatrix64F R)
        Creates a rotation matrix about the y-axis.
        Parameters:
        ang - the angle it rotates a point by in radians.
        R - (Output) Optional storage for rotation matrix. Modified.
        Returns:
        The 3 by 3 rotation matrix.
      • setRotY

        public static void setRotY(float ang,
                                   org.ejml.data.DenseMatrix64F r)
        Sets the values in the specified matrix to a rotation matrix about the y-axis.
        Parameters:
        ang - the angle it rotates a point by in radians.
        r - A 3 by 3 matrix. Is modified.
      • rotZ

        public static org.ejml.data.DenseMatrix64F rotZ(float ang,
                                                        org.ejml.data.DenseMatrix64F R)
        Creates a rotation matrix about the z-axis.
        Parameters:
        ang - the angle it rotates a point by in radians.
        R - (Output) Optional storage for rotation matrix. Modified.
        Returns:
        The 3 by 3 rotation matrix.
      • setRotZ

        public static void setRotZ(float ang,
                                   org.ejml.data.DenseMatrix64F r)
        Sets the values in the specified matrix to a rotation matrix about the z-axis.
        Parameters:
        ang - the angle it rotates a point by in radians.
        r - A 3 by 3 matrix. Is modified.
      • eulerToMatrix

        public static org.ejml.data.DenseMatrix64F eulerToMatrix(EulerType type,
                                                                 float rotA,
                                                                 float rotB,
                                                                 float rotC,
                                                                 org.ejml.data.DenseMatrix64F R)
        Converts an Euler coordinate into a rotation matrix. Different type of Euler coordinates are accepted.
        Parameters:
        type - Which Euler coordinate is the input in
        rotA - Angle of rotation around axis A. First rotation
        rotB - Angle of rotation around axis B Second rotation
        rotC - Angle of rotation around axis C Third rotation
        R - (Output) Optional storage for output rotation matrix
        Returns:
        Rotation matrix
      • approximateRotationMatrix

        public static org.ejml.data.DenseMatrix64F approximateRotationMatrix(org.ejml.data.DenseMatrix64F orig,
                                                                             org.ejml.data.DenseMatrix64F R)

        Finds a rotation matrix which is the optimal approximation to an arbitrary 3 by 3 matrix. Optimality is specified by the equation below:

        min ||R-Q||2F
        R
        where R is the rotation matrix and Q is the matrix being approximated.

        The technique used is based on SVD and is described in Appendix C of "A Flexible New Technique for Camera Calibration" Technical Report, updated 2002.

        Both origin and R can be the same instance.

        Parameters:
        orig - Input approximate rotation matrix. Not modified.
        R - (Optional) Storage for the approximated rotation matrix. Modified.
        Returns:
        Rotation matrix
      • quaternionToMatrix

        public static org.ejml.data.DenseMatrix64F quaternionToMatrix(Quaternion_F32 quat,
                                                                      org.ejml.data.DenseMatrix64F R)

        Converts a unit quaternion into a rotation matrix.

        Equations is taken from: Paul J. Besl and Neil D. McKay, "A Method for Registration of 3-D Shapes" IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol 14, No. 2, Feb. 1992

        Parameters:
        quat - Unit quaternion.
        R - Storage for rotation matrix. If null a new matrix is created. Modified.
        Returns:
        Rotation matrix

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.