Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
vpHomogeneousMatrix Class Reference

#include <vpHomogeneousMatrix.h>

Inheritance diagram for vpHomogeneousMatrix:

Public Member Functions

 vpHomogeneousMatrix ()
 vpHomogeneousMatrix (const vpHomogeneousMatrix &M)
 vpHomogeneousMatrix (const vpTranslationVector &t, const vpRotationMatrix &R)
 vpHomogeneousMatrix (const vpTranslationVector &t, const vpThetaUVector &tu)
 vpHomogeneousMatrix (const vpTranslationVector &t, const vpQuaternionVector &q)
VP_EXPLICIT vpHomogeneousMatrix (const vpPoseVector &p)
VP_EXPLICIT vpHomogeneousMatrix (const std::vector< float > &v)
VP_EXPLICIT vpHomogeneousMatrix (const std::vector< double > &v)
 vpHomogeneousMatrix (double tx, double ty, double tz, double tux, double tuy, double tuz)
VP_EXPLICIT vpHomogeneousMatrix (const std::initializer_list< double > &list)
vpHomogeneousMatrixbuildFrom (const vpTranslationVector &t, const vpRotationMatrix &R)
vpHomogeneousMatrixbuildFrom (const vpTranslationVector &t, const vpThetaUVector &tu)
vpHomogeneousMatrixbuildFrom (const vpTranslationVector &t, const vpQuaternionVector &q)
vpHomogeneousMatrixbuildFrom (const vpPoseVector &p)
vpHomogeneousMatrixbuildFrom (const std::vector< float > &v)
vpHomogeneousMatrixbuildFrom (const std::vector< double > &v)
vpHomogeneousMatrixbuildFrom (const double &tx, const double &ty, const double &tz, const double &tux, const double &tuy, const double &tuz)
void convert (std::vector< float > &M)
void convert (std::vector< double > &M)
void eye ()
vpColVector getCol (unsigned int j) const
vpRotationMatrix getRotationMatrix () const
vpThetaUVector getThetaUVector () const
vpTranslationVector getTranslationVector () const
vpHomogeneousMatrix inverse () const
void inverse (vpHomogeneousMatrix &Mi) const
bool isAnHomogeneousMatrix (double threshold=1e-6) const
bool isValid () const
void insert (const vpRotationMatrix &R)
void insert (const vpThetaUVector &tu)
void insert (const vpTranslationVector &t)
void insert (const vpQuaternionVector &t)
void extract (vpRotationMatrix &R) const
void extract (vpThetaUVector &tu) const
void extract (vpTranslationVector &t) const
void extract (vpQuaternionVector &q) const
void load (std::ifstream &f)
void load (const std::string &filename)
void save (std::ofstream &f) const
void save (const std::string &filename) const
vpHomogeneousMatrixoperator= (const vpHomogeneousMatrix &M)
vpHomogeneousMatrix operator* (const vpHomogeneousMatrix &M) const
vpHomogeneousMatrixoperator*= (const vpHomogeneousMatrix &M)
vpColVector operator* (const vpColVector &v) const
vpTranslationVector operator* (const vpTranslationVector &t) const
vpHomogeneousMatrix operator* (const vpRotationMatrix &R) const
vpPoint operator* (const vpPoint &bP) const
vpHomogeneousMatrixoperator<< (double val)
vpHomogeneousMatrixoperator, (double val)
void orthogonalizeRotation ()
void print () const
VP_NORETURN void resize (unsigned int nrows, unsigned int ncols, bool flagNullify=true)
Inherited functionalities from vpArray2D
unsigned int getCols () const
double getMaxValue () const
double getMinValue () const
unsigned int getRows () const
unsigned int size () const
void resize (unsigned int nrows, unsigned int ncols, bool flagNullify=true, bool recopy_=true)
void reshape (unsigned int nrows, unsigned int ncols)
void insert (const vpArray2D< double > &A, unsigned int r, unsigned int c)
bool operator!= (const vpArray2D< double > &A) const
double * operator[] (unsigned int i)
vpArray2D< double > hadamard (const vpArray2D< double > &m) const
vpArray2D< double > t () const

Static Public Member Functions

static vpHomogeneousMatrix compute3d3dTransformation (const std::vector< vpPoint > &p, const std::vector< vpPoint > &q)
static vpHomogeneousMatrix mean (const std::vector< vpHomogeneousMatrix > &vec_M)
static vpArray2D< double > view (const vpArray2D< double > &A)

Public Attributes

double * data

Static Public Attributes

static const std::string jsonTypeName = "vpHomogeneousMatrix"

Friends

void to_json (nlohmann::json &j, const vpHomogeneousMatrix &T)
void from_json (const nlohmann::json &j, vpHomogeneousMatrix &T)

(Note that these are not member symbols.)

bool operator== (const vpArray2D< double > &A) const
bool operator== (const vpArray2D< float > &A) const
void vpGEMM (const vpArray2D< double > &A, const vpArray2D< double > &B, const double &alpha, const vpArray2D< double > &C, const double &beta, vpArray2D< double > &D, const unsigned int &ops=0)
enum  vpGEMMmethod

Deprecated functions

unsigned int m_index
VP_DEPRECATED void init ()
VP_DEPRECATED void setIdentity ()

Inherited I/O from vpArray2D with Static Public Member Functions

unsigned int rowNum
unsigned int colNum
double ** rowPtrs
unsigned int dsize
bool isMemoryOwner
bool isRowPtrsOwner
static bool load (const std::string &filename, vpArray2D< double > &A, bool binary=false, char *header=nullptr)
static bool loadYAML (const std::string &filename, vpArray2D< double > &A, char *header=nullptr)
static bool save (const std::string &filename, const vpArray2D< double > &A, bool binary=false, const char *header="")
static bool saveYAML (const std::string &filename, const vpArray2D< double > &A, const char *header="")
static vpArray2D< double > conv2 (const vpArray2D< double > &M, const vpArray2D< double > &kernel, const std::string &mode)
static bool isFinite (const vpArray2D< double > &A)

Detailed Description

Implementation of an homogeneous matrix and operations on such kind of matrices.

The class provides a data structure for the homogeneous matrices as well as a set of operations on these matrices.

The vpHomogeneousMatrix class is derived from vpArray2D<double>.

An homogeneous matrix is 4x4 matrix defines as

\‍[^a{\bf M}_b = \left(\begin{array}{cc}
^a{\bf R}_b & ^a{\bf t}_b \\
{\bf 0}_{1\times 3} & 1
\end{array}
\right)
\‍]

that defines the position of frame b in frame a

$ ^a{\bf R}_b $ is a rotation matrix and $ ^a{\bf t}_b $ is a translation vector.

There are different ways to initialize an homogeneous matrix. You can set each element of the matrix like:

#include <visp3/core/vpHomogeneousMatrix.h>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
int main()
{
M[0][0] = 0; M[0][1] = 0; M[0][2] = -1; M[0][3] = 0.1;
M[1][0] = 0; M[1][1] = -1; M[1][2] = 0; M[1][3] = 0.2;
M[2][0] = -1; M[2][1] = 0; M[2][2] = 0; M[2][3] = 0.3;
std::cout << "M:" << std::endl;
for (unsigned int i = 0; i < M.getRows(); ++i) {
for (unsigned int j = 0; j < M.getCols(); ++j) {
std::cout << M[i][j] << " ";
}
std::cout << std::endl;
}
}
unsigned int getCols() const
Definition vpArray2D.h:423
unsigned int getRows() const
Definition vpArray2D.h:433

It produces the following printings:

M:
0 0 -1 0.1
0 -1 0 0.2
-1 0 0 0.3
0 0 0 1

You can also use vpRotationMatrix::operator<< and vpTranslationVector::operator<< like:

#include <visp3/core/vpHomogeneousMatrix.h>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
int main()
{
R << 0, 0, -1,
0, -1, 0,
-1, 0, 0;
t << 0.1, 0.2, 0.3;
std::cout << "M:\n" << M << std::endl;
}
vpArray2D< double > t() const
Definition vpArray2D.h:1273
Implementation of a rotation matrix and operations on such kind of matrices.
Class that consider the case of a translation vector.

If ViSP is build with c++11 enabled, you can do the same using:

#include <visp3/core/vpHomogeneousMatrix.h>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
int main()
{
{
vpHomogeneousMatrix M( vpTranslationVector(0.1, 0.2, 0.3), vpRotationMatrix( {0, 0, -1, 0, -1, 0, -1, 0, 0} ) );
std::cout << "M:\n" << M << std::endl;
}
{
vpHomogeneousMatrix M { 0, 0, -1, 0.1,
0, -1, 0, 0.2,
-1, 0, 0, 0.3 };
std::cout << "M:\n" << M << std::endl;
}
}

JSON serialization

Since ViSP 3.6.0, if ViSP is build with JSON for modern C++ 3rd-party we introduce JSON serialization capabilities for vpHomogeneousMatrix. The following sample code shows how to save a homogeneous matrix in a file named homo-mat.json and reload the values from this JSON file.

#include <visp3/core/vpHomogeneousMatrix.h>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
int main()
{
#if defined(VISP_HAVE_NLOHMANN_JSON)
std::string filename = "homo-mat.json";
{
vpHomogeneousMatrix M(vpTranslationVector(0.1, 0.2, 0.3), vpRotationMatrix({ 0, 0, -1, 0, -1, 0, -1, 0, 0 }));
std::ofstream file(filename);
const nlohmann::json j = M;
file << j;
file.close();
}
{
std::ifstream file(filename);
const nlohmann::json j = nlohmann::json::parse(file);
M = j;
file.close();
std::cout << "Read homogeneous matrix from " << filename << ":\n" << M << std::endl;
}
#endif
}

If you build and execute the sample code, it will produce the following output:

Read homogeneous matrix from homo-mat.json:
0 0 -1 0.1
0 -1 0 0.2
-1 0 0 0.3
0 0 0 1

The content of the homo-mat.json file is the following:

$ cat homo-mat.json
{"cols":4,"data":[0.0,0.0,-1.0,0.1,0.0,-1.0,0.0,0.2,-1.0,0.0,0.0,0.3,0.0,0.0,0.0,1.0],"rows":4,"type":"vpHomogeneousMatrix"}
Examples
AROgre.cpp, AROgreBasic.cpp, ClassUsingDisplayPCL.h, HelloWorldOgre.cpp, HelloWorldOgreAdvanced.cpp, catchAprilTag.cpp, catchArUco.cpp, catchCalibHandEye.cpp, catchEigenConversion.cpp, catchGenericTrackerDeterminist.cpp, catchHomogeneousMatrix.cpp, catchMathUtils.cpp, catchNPZ.cpp, catchPanda.cpp, catchPoseRansac2.cpp, catchPoseVector.cpp, catchRBT.cpp, catchRBTDataset.cpp, catchRotation.cpp, exponentialMap.cpp, grabRealSense2_T265.cpp, homographyHLM2DObject.cpp, homographyHLM3DObject.cpp, homographyHartleyDLT2DObject.cpp, homographyRansac2DObject.cpp, manGeometricFeatures.cpp, manServo4PointsDisplay.cpp, manServoMomentsSimple.cpp, manSimu4Dots.cpp, manSimu4Points.cpp, mbot-apriltag-2D-half-vs.cpp, mbot-apriltag-ibvs.cpp, mbot-apriltag-pbvs.cpp, mbtEdgeKltTracking.cpp, mbtEdgeTracking.cpp, mbtGenericTracking.cpp, mbtGenericTracking2.cpp, mbtGenericTrackingDepth.cpp, mbtGenericTrackingDepthOnly.cpp, mbtKltTracking.cpp, perfGenericTracker.cpp, perfMatrixMultiplication.cpp, photometricMappingVisualServoing.cpp, photometricVisualServoing.cpp, photometricVisualServoingWithoutVpServo.cpp, poseVirtualVS.cpp, sendMocapToPixhawk.cpp, servoAfma62DhalfCamVelocity.cpp, servoAfma6AprilTagIBVS.cpp, servoAfma6AprilTagPBVS.cpp, servoAfma6Cylinder2DCamVelocity.cpp, servoAfma6Cylinder2DCamVelocitySecondaryTask.cpp, servoAfma6FourPoints2DCamVelocityLs_cur.cpp, servoAfma6FourPoints2DCamVelocityLs_cur_integrator.cpp, servoAfma6FourPoints2DCamVelocityLs_des.cpp, servoAfma6Line2DCamVelocity.cpp, servoAfma6MegaposePBVS.cpp, servoAfma6Points2DCamVelocityEyeToHand.cpp, servoAfma6SquareLines2DCamVelocity.cpp, servoAfma6TwoLines2DCamVelocity.cpp, servoBebop2.cpp, servoBiclopsPoint2DArtVelocity.cpp, servoFlirPtuIBVS.cpp, servoFrankaIBVS-EyeToHand-Lcur_cVe_eJe.cpp, servoFrankaIBVS-EyeToHand-Lcur_cVf_fVe_eJe.cpp, servoFrankaIBVS-EyeToHand-Ldes_cVf_fVe_eJe.cpp, servoFrankaIBVS.cpp, servoFrankaPBVS.cpp, servoMomentImage.cpp, servoMomentPoints.cpp, servoMomentPolygon.cpp, servoPioneerPanSegment3D.cpp, servoPixhawkDroneIBVS.cpp, servoPololuPtuPoint2DJointVelocity.cpp, servoPtu46Point2DArtVelocity.cpp, servoSimu3D_cMcd_CamVelocity.cpp, servoSimu3D_cMcd_CamVelocityWithoutVpServo.cpp, servoSimu3D_cdMc_CamVelocity.cpp, servoSimu3D_cdMc_CamVelocityWithoutVpServo.cpp, servoSimu4Points.cpp, servoSimuAfma6FourPoints2DCamVelocity.cpp, servoSimuCircle2DCamVelocity.cpp, servoSimuCircle2DCamVelocityDisplay.cpp, servoSimuCylinder.cpp, servoSimuCylinder2DCamVelocityDisplay.cpp, servoSimuCylinder2DCamVelocityDisplaySecondaryTask.cpp, servoSimuFourPoints2DCamVelocity.cpp, servoSimuFourPoints2DCamVelocityDisplay.cpp, servoSimuFourPoints2DPolarCamVelocityDisplay.cpp, servoSimuLine2DCamVelocityDisplay.cpp, servoSimuPoint2DCamVelocity1.cpp, servoSimuPoint2DCamVelocity2.cpp, servoSimuPoint2DCamVelocity3.cpp, servoSimuPoint2DhalfCamVelocity1.cpp, servoSimuPoint2DhalfCamVelocity2.cpp, servoSimuPoint2DhalfCamVelocity3.cpp, servoSimuPoint3DCamVelocity.cpp, servoSimuSphere.cpp, servoSimuSphere2DCamVelocity.cpp, servoSimuSphere2DCamVelocityDisplay.cpp, servoSimuSphere2DCamVelocityDisplaySecondaryTask.cpp, servoSimuSquareLine2DCamVelocityDisplay.cpp, servoSimuThetaUCamVelocity.cpp, servoSimuViper850FourPoints2DCamVelocity.cpp, servoUniversalRobotsIBVS.cpp, servoUniversalRobotsPBVS.cpp, servoViper650FourPoints2DArtVelocityLs_cur.cpp, servoViper650FourPoints2DCamVelocityLs_cur-SR300.cpp, servoViper650FourPoints2DCamVelocityLs_cur.cpp, servoViper850FourPoints2DArtVelocityLs_cur.cpp, servoViper850FourPoints2DCamVelocityLs_cur.cpp, servoViper850FourPointsKinect.cpp, servoViper850Point2DArtVelocity.cpp, simulateCircle2DCamVelocity.cpp, simulateFourPoints2DCartesianCamVelocity.cpp, simulateFourPoints2DPolarCamVelocity.cpp, testCameraParametersConversion.cpp, testDisplacement.cpp, testDisplays.cpp, testFeatureMoment.cpp, testFeatureSegment.cpp, testFindMatch.cpp, testFrankaCartVelocity-3.cpp, testFrankaGetPose.cpp, testGenericTracker.cpp, testGenericTrackerDepth.cpp, testImageDraw.cpp, testKeyPoint-2.cpp, testKeyPoint-4.cpp, testMocapQualisys.cpp, testMocapVicon.cpp, testPixhawkDronePositionAbsoluteControl.cpp, testPixhawkDronePositionRelativeControl.cpp, testPixhawkDroneTakeoff.cpp, testPoint.cpp, testPose.cpp, testPoseFeatures.cpp, testPoseRansac.cpp, testRealSense2_T265_images_odometry.cpp, testRealSense2_T265_images_odometry_async.cpp, testRealSense2_T265_odometry.cpp, testRobotAfma6Pose.cpp, testRobotViper650-frames.cpp, testRobotViper850-frames.cpp, testRobotViper850.cpp, testRobotViper850Pose.cpp, testUniversalRobotsCartPosition.cpp, testUniversalRobotsGetData.cpp, testViper650.cpp, testViper850.cpp, testVirtuoseAfma6.cpp, testVirtuoseHapticBox.cpp, testVirtuoseWithGlove.cpp, testXmlParserHomogeneousMatrix.cpp, tutorial-apriltag-detector-live-rgbd-realsense.cpp, tutorial-apriltag-detector-live-rgbd-structure-core.cpp, tutorial-detection-object-mbt-deprecated.cpp, tutorial-detection-object-mbt.cpp, tutorial-detection-object-mbt2-deprecated.cpp, tutorial-detection-object-mbt2.cpp, tutorial-draw-frame.cpp, tutorial-flir-ptu-ibvs.cpp, tutorial-homography-from-points.cpp, tutorial-ibvs-4pts-display.cpp, tutorial-ibvs-4pts-image-tracking.cpp, tutorial-ibvs-4pts-ogre-tracking.cpp, tutorial-ibvs-4pts-ogre.cpp, tutorial-ibvs-4pts-plotter-continuous-gain-adaptive.cpp, tutorial-ibvs-4pts-plotter-gain-adaptive.cpp, tutorial-ibvs-4pts-plotter.cpp, tutorial-ibvs-4pts-wireframe-camera.cpp, tutorial-ibvs-4pts-wireframe-robot-afma6.cpp, tutorial-ibvs-4pts-wireframe-robot-viper.cpp, tutorial-ibvs-4pts.cpp, tutorial-image-simulator.cpp, tutorial-mb-edge-tracker.cpp, tutorial-mb-generic-tracker-apriltag-rs2.cpp, tutorial-mb-generic-tracker-apriltag-webcam.cpp, tutorial-mb-generic-tracker-full.cpp, tutorial-mb-generic-tracker-live.cpp, tutorial-mb-generic-tracker-read.cpp, tutorial-mb-generic-tracker-rgbd-blender.cpp, tutorial-mb-generic-tracker-rgbd-realsense-json.cpp, tutorial-mb-generic-tracker-rgbd-realsense.cpp, tutorial-mb-generic-tracker-rgbd-structure-core.cpp, tutorial-mb-generic-tracker-rgbd.cpp, tutorial-mb-generic-tracker-save.cpp, tutorial-mb-generic-tracker-stereo-mono.cpp, tutorial-mb-generic-tracker-stereo.cpp, tutorial-mb-generic-tracker.cpp, tutorial-mb-hybrid-tracker.cpp, tutorial-mb-klt-tracker.cpp, tutorial-mb-tracker-full.cpp, tutorial-mb-tracker.cpp, tutorial-panda3d-renderer.cpp, tutorial-pf.cpp, tutorial-pose-from-planar-object.cpp, tutorial-pose-from-points-image.cpp, tutorial-pose-from-points-live.cpp, tutorial-pose-from-points-realsense-T265.cpp, tutorial-pose-from-qrcode-image.cpp, tutorial-rbt-realsense.cpp, tutorial-rbt-sequence.cpp, tutorial-simu-pioneer-continuous-gain-adaptive.cpp, tutorial-simu-pioneer-continuous-gain-constant.cpp, tutorial-simu-pioneer-pan.cpp, tutorial-simu-pioneer.cpp, tutorial-ukf.cpp, visp-calibrate-camera.cpp, visp-compute-apriltag-poses.cpp, visp-compute-chessboard-poses.cpp, visp-compute-eye-in-hand-calibration.cpp, visp-compute-eye-to-hand-calibration.cpp, visp-save-rs-dataset.cpp, and wireframeSimulator.cpp.

Definition at line 220 of file vpHomogeneousMatrix.h.

Constructor & Destructor Documentation

◆ vpHomogeneousMatrix() [1/10]

vpHomogeneousMatrix::vpHomogeneousMatrix ( )

◆ vpHomogeneousMatrix() [2/10]

vpHomogeneousMatrix::vpHomogeneousMatrix ( const vpHomogeneousMatrix & M)

Copy constructor that initialize an homogeneous matrix from another homogeneous matrix.

Definition at line 69 of file vpHomogeneousMatrix.cpp.

References m_index, vpArray2D< double >::vpArray2D(), and vpHomogeneousMatrix().

◆ vpHomogeneousMatrix() [3/10]

vpHomogeneousMatrix::vpHomogeneousMatrix ( const vpTranslationVector & t,
const vpRotationMatrix & R )

Construct an homogeneous matrix from a translation vector and a rotation matrix.

Definition at line 90 of file vpHomogeneousMatrix.cpp.

References insert(), m_index, vpArray2D< double >::t(), and vpArray2D< double >::vpArray2D().

◆ vpHomogeneousMatrix() [4/10]

vpHomogeneousMatrix::vpHomogeneousMatrix ( const vpTranslationVector & t,
const vpThetaUVector & tu )

Construct an homogeneous matrix from a translation vector and $\theta {\bf
u}$ rotation vector.

Definition at line 78 of file vpHomogeneousMatrix.cpp.

References buildFrom(), m_index, vpArray2D< double >::t(), and vpArray2D< double >::vpArray2D().

◆ vpHomogeneousMatrix() [5/10]

vpHomogeneousMatrix::vpHomogeneousMatrix ( const vpTranslationVector & t,
const vpQuaternionVector & q )

Construct an homogeneous matrix from a translation vector and quaternion rotation vector.

Definition at line 52 of file vpHomogeneousMatrix.cpp.

References buildFrom(), vpArray2D< double >::t(), and vpArray2D< double >::vpArray2D().

◆ vpHomogeneousMatrix() [6/10]

vpHomogeneousMatrix::vpHomogeneousMatrix ( const vpPoseVector & p)

Construct an homogeneous matrix from a pose vector.

Definition at line 102 of file vpHomogeneousMatrix.cpp.

References buildFrom(), m_index, and vpArray2D< double >::vpArray2D().

◆ vpHomogeneousMatrix() [7/10]

vpHomogeneousMatrix::vpHomogeneousMatrix ( const std::vector< float > & v)

Construct an homogeneous matrix from a vector of float.

Parameters
v: Vector of 12 or 16 values corresponding to the values of the homogeneous matrix.

The following example shows how to use this function:

#include <visp3/core/vpHomogeneousMatrix.h>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
int main()
{
std::vector<float> v(12, 0);
v[1] = -1.; // ry=-90
v[4] = 1.; // rx=90
v[10] = -1.; // rz=-90
v[3] = 0.3; // tx
v[7] = 0.4; // ty
v[11] = 0.5; // tz
std::cout << "v: ";
for(unsigned int i=0; i<v.size(); ++i)
std::cout << v[i] << " ";
std::cout << std::endl;
std::cout << "M:\n" << M << std::endl;
}

It produces the following printings:

v: 0 -1 0 0.3 1 0 0 0.4 0 0 -1 0.5
M:
0 -1 0 0.3000000119
1 0 0 0.400000006
0 0 -1 0.5
0 0 0 1

Definition at line 157 of file vpHomogeneousMatrix.cpp.

References buildFrom(), m_index, and vpArray2D< double >::vpArray2D().

◆ vpHomogeneousMatrix() [8/10]

vpHomogeneousMatrix::vpHomogeneousMatrix ( const std::vector< double > & v)

Construct an homogeneous matrix from a vector of double.

Parameters
v: Vector of 12 or 16 values corresponding to the values of the homogeneous matrix.

The following example shows how to use this function:

#include <visp3/core/vpHomogeneousMatrix.h>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
int main()
{
std::vector<double> v(12, 0);
v[1] = -1.; // ry=-90
v[4] = 1.; // rx=90
v[10] = -1.; // rz=-90
v[3] = 0.3; // tx
v[7] = 0.4; // ty
v[11] = 0.5; // tz
std::cout << "v: ";
for(unsigned int i=0; i<v.size(); ++i)
std::cout << v[i] << " ";
std::cout << std::endl;
std::cout << "M:\n" << M << std::endl;
}

It produces the following printings:

v: 0 -1 0 0.3 1 0 0 0.4 0 0 -1 0.5
M:
0 -1 0 0.3
1 0 0 0.4
0 0 -1 0.5
0 0 0 1

Definition at line 295 of file vpHomogeneousMatrix.cpp.

References buildFrom(), m_index, and vpArray2D< double >::vpArray2D().

◆ vpHomogeneousMatrix() [9/10]

vpHomogeneousMatrix::vpHomogeneousMatrix ( double tx,
double ty,
double tz,
double tux,
double tuy,
double tuz )

Construct an homogeneous matrix from a translation vector ${\bf t}=(t_x,
t_y, t_z)^T$ and a $\theta {\bf u}=(\theta u_x, \theta u_y, \theta
u_z)^T$ rotation vector.

Definition at line 307 of file vpHomogeneousMatrix.cpp.

References buildFrom(), m_index, and vpArray2D< double >::vpArray2D().

◆ vpHomogeneousMatrix() [10/10]

vpHomogeneousMatrix::vpHomogeneousMatrix ( const std::initializer_list< double > & list)

Construct an homogeneous matrix from a list of 12 or 16 double values.

Parameters
list: List of double. The following code shows how to use this constructor to initialize an homogeneous matrix:
#include <visp3/core/vpHomogeneousMatrix.h>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
int main()
{
0, 0, 1, 0.1,
0, 1, 0, 0.2,
1, 0, 0, 0.3 };
std::cout << "M:\n" << M << std::endl;
0, 0, 1, 0.1,
0, 1, 0, 0.2,
1, 0, 0, 0.3,
0, 0, 0, 1 };
std::cout << "N:\n" << N << std::endl;
}
Implementation of an homogeneous matrix and operations on such kind of matrices.
It produces the following output:
M:
0 0 1 0.1
0 1 0 0.2
1 0 0 0.3
0 0 0 1
N:
0 0 1 0.1
0 1 0 0.2
1 0 0 0.3
0 0 0 1

Definition at line 205 of file vpHomogeneousMatrix.cpp.

References vpArray2D< double >::data, vpException::fatalError, m_index, and vpArray2D< double >::vpArray2D().

Member Function Documentation

◆ buildFrom() [1/7]

vpHomogeneousMatrix & vpHomogeneousMatrix::buildFrom ( const double & tx,
const double & ty,
const double & tz,
const double & tux,
const double & tuy,
const double & tuz )

Build an homogeneous matrix from a translation vector ${\bf t}=(t_x, t_y,
t_z)^T$ and a $\theta {\bf u}=(\theta u_x, \theta u_y, \theta u_z)^T$ rotation vector.

Definition at line 372 of file vpHomogeneousMatrix.cpp.

References insert(), vpArray2D< double >::t(), and vpHomogeneousMatrix().

◆ buildFrom() [2/7]

vpHomogeneousMatrix & vpHomogeneousMatrix::buildFrom ( const std::vector< double > & v)

Build an homogeneous matrix from a vector of double.

Parameters
v: Vector of 12 or 16 values corresponding to the values of the homogeneous matrix.

The following example shows how to use this function:

#include <visp3/core/vpHomogeneousMatrix.h>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
int main()
{
std::vector<double> v(12, 0);
v[1] = -1.; // ry=-90
v[4] = 1.; // rx=90
v[10] = -1.; // rz=-90
v[3] = 0.3; // tx
v[7] = 0.4; // ty
v[11] = 0.5; // tz
std::cout << "v: ";
for(unsigned int i=0; i<v.size(); ++i)
std::cout << v[i] << " ";
std::cout << std::endl;
M.buildFrom(v);
std::cout << "M:\n" << M << std::endl;
}
vpHomogeneousMatrix & buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R)

It produces the following printings:

v: 0 -1 0 0.3 1 0 0 0.4 0 0 -1 0.5
M:
0 -1 0 0.3
1 0 0 0.4
0 0 -1 0.5
0 0 0 1

Definition at line 509 of file vpHomogeneousMatrix.cpp.

References vpArray2D< double >::data, vpException::dimensionError, vpException::fatalError, isAnHomogeneousMatrix(), orthogonalizeRotation(), and vpHomogeneousMatrix().

◆ buildFrom() [3/7]

vpHomogeneousMatrix & vpHomogeneousMatrix::buildFrom ( const std::vector< float > & v)

Build an homogeneous matrix from a vector of float.

Parameters
v: Vector of 12 or 16 values corresponding to the values of the homogeneous matrix.

The following example shows how to use this function:

#include <visp3/core/vpHomogeneousMatrix.h>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
int main()
{
std::vector<float> v(12, 0);
v[1] = -1.; // ry=-90
v[4] = 1.; // rx=90
v[10] = -1.; // rz=-90
v[3] = 0.3; // tx
v[7] = 0.4; // ty
v[11] = 0.5; // tz
std::cout << "v: ";
for(unsigned int i=0; i<v.size(); ++i)
std::cout << v[i] << " ";
std::cout << std::endl;
M.buildFrom(v);
std::cout << "M:\n" << M << std::endl;
}

It produces the following printings:

v: 0 -1 0 0.3 1 0 0 0.4 0 0 -1 0.5
M:
0 -1 0 0.3000000119
1 0 0 0.400000006
0 0 -1 0.5
0 0 0 1

Definition at line 426 of file vpHomogeneousMatrix.cpp.

References vpArray2D< double >::data, vpException::dimensionError, vpException::fatalError, isAnHomogeneousMatrix(), orthogonalizeRotation(), and vpHomogeneousMatrix().

◆ buildFrom() [4/7]

vpHomogeneousMatrix & vpHomogeneousMatrix::buildFrom ( const vpPoseVector & p)

Build an homogeneous matrix from a pose vector.

Definition at line 340 of file vpHomogeneousMatrix.cpp.

References insert(), and vpHomogeneousMatrix().

◆ buildFrom() [5/7]

vpHomogeneousMatrix & vpHomogeneousMatrix::buildFrom ( const vpTranslationVector & t,
const vpQuaternionVector & q )

Build an homogeneous matrix from a translation vector and a quaternion rotation vector.

Definition at line 360 of file vpHomogeneousMatrix.cpp.

References insert(), vpArray2D< double >::t(), and vpHomogeneousMatrix().

◆ buildFrom() [6/7]

◆ buildFrom() [7/7]

vpHomogeneousMatrix & vpHomogeneousMatrix::buildFrom ( const vpTranslationVector & t,
const vpThetaUVector & tu )

Build an homogeneous matrix from a translation vector and a $\theta {\bf u}$ rotation vector.

Definition at line 319 of file vpHomogeneousMatrix.cpp.

References insert(), vpArray2D< double >::t(), and vpHomogeneousMatrix().

◆ compute3d3dTransformation()

vpHomogeneousMatrix vpHomogeneousMatrix::compute3d3dTransformation ( const std::vector< vpPoint > & p,
const std::vector< vpPoint > & q )
static

Compute the transformation between two point clouds.

Parameters
[in]p: First point cloud.
[in]q: Second point cloud.
Returns
The homogeneous transformation ${^p}{\bf M}_q$.

Definition at line 1246 of file vpHomogeneousMatrix.cpp.

References vpMatrix::svd(), vpArray2D< double >::t(), vpMatrix::t(), and vpHomogeneousMatrix().

Referenced by vpPose::computePlanarObjectPoseFromRGBD(), vpPose::computePlanarObjectPoseFromRGBD(), and vpPose::computePlanarObjectPoseWithAtLeast3Points().

◆ conv2()

vpArray2D< double > vpArray2D< double >::conv2 ( const vpArray2D< double > & M,
const vpArray2D< double > & kernel,
const std::string & mode )
staticinherited

Perform a 2D convolution similar to Matlab conv2 function: $ M \star kernel $.

Parameters
M: First matrix.
kernel: Second matrix.
mode: Convolution mode: "full" (default), "same", "valid".
Convolution mode: full, same, valid (image credit: Theano doc).
Note
This is a very basic implementation that does not use FFT.

Definition at line 1142 of file vpArray2D.h.

References vpArray2D().

◆ convert() [1/2]

void vpHomogeneousMatrix::convert ( std::vector< double > & M)

Converts an homogeneous matrix to a vector of 12 doubles.

Parameters
M: Converted matrix.

Definition at line 1154 of file vpHomogeneousMatrix.cpp.

References vpArray2D< double >::data.

◆ convert() [2/2]

void vpHomogeneousMatrix::convert ( std::vector< float > & M)

Converts an homogeneous matrix to a vector of 12 floats.

Parameters
M: Converted matrix.

Definition at line 1140 of file vpHomogeneousMatrix.cpp.

References vpArray2D< double >::data.

◆ extract() [1/4]

void vpHomogeneousMatrix::extract ( vpQuaternionVector & q) const

Extract the rotation as a quaternion.

Definition at line 948 of file vpHomogeneousMatrix.cpp.

References vpQuaternionVector::buildFrom().

◆ extract() [2/4]

void vpHomogeneousMatrix::extract ( vpRotationMatrix & R) const

◆ extract() [3/4]

void vpHomogeneousMatrix::extract ( vpThetaUVector & tu) const

Extract the rotation as a $\theta \bf u$ vector.

Definition at line 938 of file vpHomogeneousMatrix.cpp.

◆ extract() [4/4]

void vpHomogeneousMatrix::extract ( vpTranslationVector & t) const

Extract the translation vector from the homogeneous matrix.

Definition at line 925 of file vpHomogeneousMatrix.cpp.

References vpArray2D< double >::t().

◆ eye()

void vpHomogeneousMatrix::eye ( )

◆ getCol()

vpColVector vpHomogeneousMatrix::getCol ( unsigned int j) const

Extract a column vector from an homogeneous matrix.

Warning
All the indexes start from 0 in this function.
Parameters
j: Index of the column to extract. If j=0, the first column is extracted.
Returns
The extracted column vector.

The following example shows how to use this function:

#include <visp3/core/vpColVector.h>
#include <visp3/core/vpHomogeneousMatrix.h>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
int main()
{
std::cout << "Last column: \n" << t << std::endl;
}
Implementation of column vector and the associated operations.
vpColVector getCol(unsigned int j) const

It produces the following output:

Last column:
0
0
1
0

Definition at line 1227 of file vpHomogeneousMatrix.cpp.

References vpException::dimensionError, vpArray2D< double >::getCols(), and vpArray2D< double >::getRows().

◆ getCols()

unsigned int vpArray2D< double >::getCols ( ) const
inlineinherited

Return the number of columns of the 2D array.

See also
getRows(), size()
Examples
catchLuminanceMapping.cpp, catchMatrixCholesky.cpp, catchPoseVector.cpp, perfMatrixMultiplication.cpp, perfMatrixTranspose.cpp, servoViper850Point2DArtVelocity-jointAvoidance-basic.cpp, testDisplacement.cpp, testMatrix.cpp, testMatrixConditionNumber.cpp, testMatrixConvolution.cpp, testMatrixDeterminant.cpp, testMatrixInitialization.cpp, testMatrixInverse.cpp, testMatrixPseudoInverse.cpp, and testSvd.cpp.

Definition at line 423 of file vpArray2D.h.

Referenced by vpMatrix::choleskyByEigen3(), vpMatrix::choleskyByLapack(), vpMatrix::choleskyByOpenCV(), vpMatrix::cond(), vpMatrix::cppPrint(), vpRowVector::cppPrint(), vpMatrix::csvPrint(), vpRowVector::csvPrint(), vpMatrix::detByLUEigen3(), vpMatrix::extract(), vpHomogeneousMatrix::getCol(), vpMatrix::getCol(), vpRotationMatrix::getCol(), vpMatrix::inducedL2Norm(), vpMatrix::inverseByLUEigen3(), vpMatrix::inverseByQRLapack(), vpRotationMatrix::isARotationMatrix(), vpMatrix::kernel(), vpMatrix::maplePrint(), vpRowVector::maplePrint(), vpMatrix::matlabPrint(), vpRowVector::matlabPrint(), vpMatrix::nullSpace(), vpMatrix::nullSpace(), vpRowVector::operator*(), vpRowVector::operator+(), vpRowVector::operator+=(), vpRowVector::operator-(), vpRowVector::operator-=(), vpForceTwistMatrix::print(), vpMatrix::print(), vpRowVector::print(), vpVelocityTwistMatrix::print(), vpMatrix::row(), vpMatrix::svdEigen3(), vpMatrix::svdLapack(), vpMatrix::svdOpenCV(), vpRowVector::vpRowVector(), and vpRowVector::vpRowVector().

◆ getMaxValue()

double vpArray2D< double >::getMaxValue ( ) const
inherited

Return the array max value.

Examples
servoMomentImage.cpp.

Definition at line 425 of file vpArray2D.h.

◆ getMinValue()

double vpArray2D< double >::getMinValue ( ) const
inherited

Return the array min value.

Examples
servoMomentImage.cpp.

Definition at line 427 of file vpArray2D.h.

◆ getRotationMatrix()

◆ getRows()

unsigned int vpArray2D< double >::getRows ( ) const
inlineinherited

Return the number of rows of the 2D array.

See also
getCols(), size()
Examples
catchLuminanceMapping.cpp, catchMatrixCholesky.cpp, catchParticleFilter.cpp, catchPoseVector.cpp, perfMatrixMultiplication.cpp, perfMatrixTranspose.cpp, testDisplacement.cpp, testMatrix.cpp, testMatrixConditionNumber.cpp, testMatrixConvolution.cpp, testMatrixDeterminant.cpp, testMatrixInitialization.cpp, testMatrixInverse.cpp, testMatrixPseudoInverse.cpp, and testSvd.cpp.

Definition at line 433 of file vpArray2D.h.

Referenced by vpMatrix::choleskyByEigen3(), vpMatrix::choleskyByLapack(), vpMatrix::choleskyByOpenCV(), vpMatrix::column(), vpMatrix::cond(), vpColVector::cppPrint(), vpMatrix::cppPrint(), vpColVector::csvPrint(), vpMatrix::csvPrint(), vpMatrix::detByLUEigen3(), vpMatrix::extract(), vpHomogeneousMatrix::getCol(), vpMatrix::getCol(), vpRotationMatrix::getCol(), vpMatrix::inducedL2Norm(), vpMatrix::inverseByCholeskyLapack(), vpMatrix::inverseByLUEigen3(), vpMatrix::inverseByQRLapack(), vpRotationMatrix::isARotationMatrix(), vpMatrix::kernel(), vpColVector::maplePrint(), vpMatrix::maplePrint(), vpColVector::matlabPrint(), vpMatrix::matlabPrint(), vpMatrix::nullSpace(), vpMatrix::nullSpace(), vpColVector::operator*(), vpColVector::operator+(), vpColVector::operator+(), vpColVector::operator+=(), vpColVector::operator+=(), vpColVector::operator-(), vpColVector::operator-=(), vpColVector::operator-=(), vpColVector::print(), vpForceTwistMatrix::print(), vpMatrix::print(), vpPoseVector::print(), vpVelocityTwistMatrix::print(), vpMatrix::svdEigen3(), vpMatrix::svdLapack(), vpMatrix::svdOpenCV(), vpColVector::vpColVector(), and vpColVector::vpColVector().

◆ getThetaUVector()

vpThetaUVector vpHomogeneousMatrix::getThetaUVector ( ) const

Return the $\theta {\bf u}$ vector that corresponds to the rotation part of the homogeneous transformation.

Examples
catchCalibHandEye.cpp, catchRBT.cpp, servoAfma6AprilTagPBVS.cpp, servoAfma6MegaposePBVS.cpp, and servoFrankaPBVS.cpp.

Definition at line 1188 of file vpHomogeneousMatrix.cpp.

References extract().

Referenced by vpRBKltTracker::vpTrackedKltPoint::rotationDifferenceToInitial().

◆ getTranslationVector()

◆ hadamard()

vpArray2D< double > vpArray2D< double >::hadamard ( const vpArray2D< double > & m) const
inherited

Compute the Hadamard product (element wise matrix multiplication).

Parameters
m: Second matrix;
Returns
m1.hadamard(m2) The Hadamard product : $ m1 \circ m2 = (m1 \circ
m2)_{i,j} = (m1)_{i,j} (m2)_{i,j} $

Definition at line 732 of file vpArray2D.h.

References vpArray2D().

◆ init()

VP_DEPRECATED void vpHomogeneousMatrix::init ( )
inline
Deprecated
Provided only for compat with previous releases. This function does nothing.
Examples
servoAfma6MegaposePBVS.cpp.

Definition at line 427 of file vpHomogeneousMatrix.h.

◆ insert() [1/5]

void vpArray2D< double >::insert ( const vpArray2D< double > & A,
unsigned int r,
unsigned int c )
inlineinherited

Insert array A at the given position in the current array.

Warning
Throw vpException::dimensionError if the dimensions of the matrices do not allow the operation.
Parameters
A: The array to insert.
r: The index of the row to begin to insert data.
c: The index of the column to begin to insert data.

Definition at line 586 of file vpArray2D.h.

◆ insert() [2/5]

void vpHomogeneousMatrix::insert ( const vpQuaternionVector & q)

Insert the rotational component of the homogeneous matrix from a quaternion rotation vector.

Definition at line 1000 of file vpHomogeneousMatrix.cpp.

References insert().

◆ insert() [3/5]

void vpHomogeneousMatrix::insert ( const vpRotationMatrix & R)

◆ insert() [4/5]

void vpHomogeneousMatrix::insert ( const vpThetaUVector & tu)

Insert the rotational component of the homogeneous matrix from a $theta {\bf u}$ rotation vector.

Definition at line 974 of file vpHomogeneousMatrix.cpp.

References insert().

◆ insert() [5/5]

void vpHomogeneousMatrix::insert ( const vpTranslationVector & t)

Insert the translational component in a homogeneous matrix.

Definition at line 983 of file vpHomogeneousMatrix.cpp.

References vpArray2D< double >::t().

◆ inverse() [1/2]

vpHomogeneousMatrix vpHomogeneousMatrix::inverse ( ) const

Invert the homogeneous matrix.

Returns
The inverse of the homogenous matrix.

\‍[\left[\begin{array}{cc}
{\bf R} & {\bf t} \\
{\bf 0}_{1\times 3} & 1
\end{array}
\right]^{-1} = \left[\begin{array}{cc}
{\bf R}^T & -{\bf R}^T {\bf t} \\
{\bf 0}_{1\times 3} & 1
\end{array}
\right]\‍]

Examples
catchCalibHandEye.cpp, catchHomogeneousMatrix.cpp, catchRBTDataset.cpp, grabRealSense2_T265.cpp, manServo4PointsDisplay.cpp, manServoMomentsSimple.cpp, manSimu4Dots.cpp, manSimu4Points.cpp, photometricMappingVisualServoing.cpp, photometricVisualServoing.cpp, photometricVisualServoingWithoutVpServo.cpp, servoAfma62DhalfCamVelocity.cpp, servoAfma6AprilTagIBVS.cpp, servoAfma6AprilTagPBVS.cpp, servoAfma6MegaposePBVS.cpp, servoBebop2.cpp, servoFrankaIBVS-EyeToHand-Lcur_cVe_eJe.cpp, servoFrankaIBVS.cpp, servoFrankaPBVS.cpp, servoMomentImage.cpp, servoPixhawkDroneIBVS.cpp, servoSimu3D_cMcd_CamVelocity.cpp, servoSimu3D_cMcd_CamVelocityWithoutVpServo.cpp, servoSimu3D_cdMc_CamVelocity.cpp, servoSimu3D_cdMc_CamVelocityWithoutVpServo.cpp, servoSimu4Points.cpp, servoSimuCircle2DCamVelocity.cpp, servoSimuCircle2DCamVelocityDisplay.cpp, servoSimuCylinder.cpp, servoSimuCylinder2DCamVelocityDisplay.cpp, servoSimuCylinder2DCamVelocityDisplaySecondaryTask.cpp, servoSimuFourPoints2DCamVelocity.cpp, servoSimuFourPoints2DCamVelocityDisplay.cpp, servoSimuFourPoints2DPolarCamVelocityDisplay.cpp, servoSimuLine2DCamVelocityDisplay.cpp, servoSimuPoint2DCamVelocity1.cpp, servoSimuPoint2DCamVelocity2.cpp, servoSimuPoint2DCamVelocity3.cpp, servoSimuPoint2DhalfCamVelocity1.cpp, servoSimuPoint2DhalfCamVelocity2.cpp, servoSimuPoint2DhalfCamVelocity3.cpp, servoSimuPoint3DCamVelocity.cpp, servoSimuSphere.cpp, servoSimuSphere2DCamVelocity.cpp, servoSimuSphere2DCamVelocityDisplay.cpp, servoSimuSphere2DCamVelocityDisplaySecondaryTask.cpp, servoSimuSquareLine2DCamVelocityDisplay.cpp, servoSimuThetaUCamVelocity.cpp, simulateCircle2DCamVelocity.cpp, simulateFourPoints2DCartesianCamVelocity.cpp, simulateFourPoints2DPolarCamVelocity.cpp, testFeatureSegment.cpp, testRealSense2_T265_images_odometry.cpp, testRealSense2_T265_images_odometry_async.cpp, testRealSense2_T265_odometry.cpp, testRobotViper650-frames.cpp, testRobotViper850-frames.cpp, testVirtuoseHapticBox.cpp, testVirtuoseWithGlove.cpp, tutorial-ibvs-4pts-display.cpp, tutorial-ibvs-4pts-image-tracking.cpp, tutorial-ibvs-4pts-json.cpp, tutorial-ibvs-4pts-ogre-tracking.cpp, tutorial-ibvs-4pts-ogre.cpp, tutorial-ibvs-4pts-plotter-continuous-gain-adaptive.cpp, tutorial-ibvs-4pts-plotter-gain-adaptive.cpp, tutorial-ibvs-4pts-plotter.cpp, tutorial-ibvs-4pts-wireframe-camera.cpp, tutorial-ibvs-4pts.cpp, tutorial-mb-generic-tracker-rgbd-structure-core.cpp, tutorial-pf.cpp, tutorial-simu-pioneer-continuous-gain-adaptive.cpp, tutorial-simu-pioneer-continuous-gain-constant.cpp, tutorial-simu-pioneer-pan.cpp, tutorial-simu-pioneer.cpp, and tutorial-ukf.cpp.

Definition at line 1016 of file vpHomogeneousMatrix.cpp.

References extract(), insert(), and vpHomogeneousMatrix().

Referenced by vpObjectCentricRenderer::computeBoundingBox(), vpObjectCentricRenderer::computeClipping(), vpBiclops::computeMGD(), vpPtu46::computeMGD(), vpPanda3DBaseRenderer::computeNearAndFarPlanesFromNode(), vpMbDepthDenseTracker::computeVVS(), vpMbDepthNormalTracker::computeVVS(), vpMbEdgeKltTracker::computeVVS(), vpMbEdgeTracker::computeVVS(), vpMbGenericTracker::computeVVS(), vpMbKltTracker::computeVVS(), vpMbEdgeTracker::computeVVSFirstPhasePoseEstimation(), vpPtu46::get_cMe(), vpRobotWireFrameSimulator::get_cMo(), vpViper::get_eJe(), vpViper::get_fJe(), vpBiclops::get_fMc(), vpRobotAfma6::getDisplacement(), vpRobotBiclops::getDisplacement(), vpSimulator::getExternalCameraPosition(), vpSimulatorAfma6::getExternalImage(), vpSimulatorViper850::getExternalImage(), vpWireFrameSimulator::getExternalImage(), vpWireFrameSimulator::getExternalImage(), vpRobotFranka::getForceTorque(), vpRobotUniversalRobots::getForceTorque(), vpRobotWireFrameSimulator::getInternalView(), vpRobotWireFrameSimulator::getInternalView(), vpViper::getInverseKinematics(), vpRobotAfma6::getVelocity(), vpRobotViper650::getVelocity(), vpRobotViper850::getVelocity(), vpSimulatorAfma6::initialiseCameraRelativeToObject(), vpSimulatorViper850::initialiseCameraRelativeToObject(), inverse(), vpRBVisualOdometryUtils::levenbergMarquardtKeypoints2D(), vpRBVisualOdometryUtils::levenbergMarquardtKeypoints3D(), vpPose::poseVirtualVS(), vpPose::poseVirtualVSrobust(), vpPose::poseVirtualVSWithDepth(), vpWireFrameSimulator::projectCameraTrajectory(), vpWireFrameSimulator::projectCameraTrajectory(), vpWireFrameSimulator::projectCameraTrajectory(), vpWireFrameSimulator::projectCameraTrajectory(), vpPioneerPan::set_cMe(), vpWireFrameSimulator::setCameraPositionRelObj(), vpWireFrameSimulator::setCameraPositionRelWorld(), vpMbKltTracker::setPose(), vpSimulatorAfma6::setPosition(), vpRobotCamera::setVelocity(), vpRBTracker::track(), and vpRBProbabilistic3DDriftDetector::update().

◆ inverse() [2/2]

void vpHomogeneousMatrix::inverse ( vpHomogeneousMatrix & M) const

Invert the homogeneous matrix.

Parameters
M: The inverted homogeneous matrix: $\left[\begin{array}{cc}
{\bf R} & {\bf t} \\
{\bf 0}_{1\times 3} & 1
\end{array}
\right]^{-1} = \left[\begin{array}{cc}
{\bf R}^T & -{\bf R}^T {\bf t} \\
{\bf 0}_{1\times 3} & 1
\end{array}
\right]$

Definition at line 1076 of file vpHomogeneousMatrix.cpp.

References inverse(), and vpHomogeneousMatrix().

◆ isAnHomogeneousMatrix()

bool vpHomogeneousMatrix::isAnHomogeneousMatrix ( double threshold = 1e-6) const

Test if the 3x3 rotational part of the homogeneous matrix is a valid rotation matrix and the last row is equal to [0, 0, 0, 1].

Returns
true if the matrix is a homogeneous matrix, false otherwise.

Definition at line 878 of file vpHomogeneousMatrix.cpp.

References vpMath::equal(), extract(), and vpMath::nul().

Referenced by buildFrom(), and buildFrom().

◆ isFinite()

bool vpArray2D< double >::isFinite ( const vpArray2D< double > & A)
inlinestaticinherited

Definition at line 1188 of file vpArray2D.h.

◆ isValid()

bool vpHomogeneousMatrix::isValid ( ) const

Check if the homogeneous transformation matrix doesn't have a value NaN.

Returns
true when no NaN found, false otherwise.

Definition at line 897 of file vpHomogeneousMatrix.cpp.

References vpArray2D< double >::data, vpMath::isNaN(), and vpArray2D< double >::size().

◆ load() [1/3]

bool vpArray2D< double >::load ( const std::string & filename,
vpArray2D< double > & A,
bool binary = false,
char * header = nullptr )
inlinestaticinherited

Load a matrix from a file.

Parameters
filename: Absolute file name.
A: Array to be loaded
binary: If true the matrix is loaded from a binary file, else from a text file.
header: Header of the file is loaded in this parameter.
Returns
Returns true if success.
See also
save()

Definition at line 760 of file vpArray2D.h.

◆ load() [2/3]

void vpHomogeneousMatrix::load ( const std::string & filename)

Read an homogeneous matrix from an input file. The homogeneous matrix is considered as a 4 by 4 matrix.

Parameters
filename: Input file name.

The code below shows how to get an homogeneous matrix from a file.

M.load("homogeneous.dat");
void load(std::ifstream &f)
See also
load(std::ifstream &), save(const std::string &)

Definition at line 1111 of file vpHomogeneousMatrix.cpp.

References load().

◆ load() [3/3]

void vpHomogeneousMatrix::load ( std::ifstream & f)

Read an homogeneous matrix from an input file stream. The homogeneous matrix is considered as a 4 by 4 matrix.

Parameters
f: Input file stream.

The code below shows how to get an homogeneous matrix from a file.

std::ifstream f("homogeneous.dat");
M.load(f);
See also
load(const std::string &), save(std::ifstream &)
Examples
servoAfma6Points2DCamVelocityEyeToHand.cpp, tutorial-mb-generic-tracker-rgbd-blender.cpp, and tutorial-mb-generic-tracker-stereo.cpp.

Definition at line 1096 of file vpHomogeneousMatrix.cpp.

References vpException::ioError.

Referenced by load().

◆ loadYAML()

bool vpArray2D< double >::loadYAML ( const std::string & filename,
vpArray2D< double > & A,
char * header = nullptr )
inlinestaticinherited

◆ mean()

vpHomogeneousMatrix vpHomogeneousMatrix::mean ( const std::vector< vpHomogeneousMatrix > & vec_M)
static

Compute the Euclidean mean of the homogeneous matrices. The Euclidean mean of the rotation matrices is computed following Moakher's method (SIAM 2002).

Parameters
[in]vec_M: Set of homogeneous matrices.
Returns
The Euclidean mean of the homogeneous matrices.
See also
vpTranslationVector::mean(), vpRotationMatrix::mean()
Examples
catchRBTDataset.cpp.

Definition at line 1308 of file vpHomogeneousMatrix.cpp.

References mean(), vpMatrix::pseudoInverse(), vpArray2D< double >::t(), vpMatrix::t(), and vpHomogeneousMatrix().

Referenced by mean().

◆ operator!=()

bool operator!= ( const vpArray2D< double > & A) const
inherited

Not equal to comparison operator of a 2D array.

Definition at line 612 of file vpArray2D.h.

References vpArray2D().

◆ operator*() [1/5]

vpColVector vpHomogeneousMatrix::operator* ( const vpColVector & v) const

Operator that allow to multiply an homogeneous matrix by a 4-dimension column vector.

Exceptions
vpException::dimensionError: If the vector v is not a 4-dimension vector.

Definition at line 645 of file vpHomogeneousMatrix.cpp.

References vpException::dimensionError, vpArray2D< double >::rowNum, and vpArray2D< double >::rowPtrs.

◆ operator*() [2/5]

vpHomogeneousMatrix vpHomogeneousMatrix::operator* ( const vpHomogeneousMatrix & M) const

Operator that allow to multiply an homogeneous matrix by an other one.

#include <visp3/core/vpHomogeneousMatrix.h>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
int main()
{
// Initialize aMb and bMc...
// Compute aMc * bMc
vpHomogeneousMatrix aMc = aMb * bMc;
}

Definition at line 588 of file vpHomogeneousMatrix.cpp.

References extract(), and vpHomogeneousMatrix().

◆ operator*() [3/5]

vpPoint vpHomogeneousMatrix::operator* ( const vpPoint & bP) const

From the coordinates of the point in camera frame b and the transformation between camera frame a and camera frame b computes the coordinates of the point in camera frame a.

Parameters
bP: 3D coordinates of the point in camera frame bP.
Returns
A point with 3D coordinates in the camera frame a. The coordinates in the world or object frame are set to the same coordinates than the one in the camera frame.

Definition at line 678 of file vpHomogeneousMatrix.cpp.

References vpPoint::get_W(), vpPoint::get_X(), vpPoint::get_Y(), vpPoint::get_Z(), vpPoint::set_oW(), vpPoint::set_oX(), vpPoint::set_oY(), vpPoint::set_oZ(), vpPoint::set_W(), vpPoint::set_X(), vpPoint::set_Y(), and vpPoint::set_Z().

◆ operator*() [4/5]

vpHomogeneousMatrix vpHomogeneousMatrix::operator* ( const vpRotationMatrix & R) const

Operator that allows to multiply a rotation matrix by a rotation matrix.

Parameters
[in]R: Rotation matrix.
Returns
The product between the homogeneous matrix and the rotation matrix R.

The following snippet shows how to use this method:

vpHomogeneousMatrix c1_M_c3 = c1_M_c2 * c2_R_c3;

Definition at line 753 of file vpHomogeneousMatrix.cpp.

References vpHomogeneousMatrix().

◆ operator*() [5/5]

vpTranslationVector vpHomogeneousMatrix::operator* ( const vpTranslationVector & t) const

Since a translation vector could be seen as the origin point of a frame, this function computes the new coordinates of a translation vector after applying an homogeneous transformation.

Parameters
t: Translation vector seen as the 3D coordinates of a point.
Returns
A translation vector that contains the new 3D coordinates after applying the homogeneous transformation.

Definition at line 725 of file vpHomogeneousMatrix.cpp.

References vpArray2D< double >::t().

◆ operator*=()

vpHomogeneousMatrix & vpHomogeneousMatrix::operator*= ( const vpHomogeneousMatrix & M)

Operator that allow to multiply an homogeneous matrix by an other one.

#include <visp3/core/vpHomogeneousMatrix.h>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
int main()
{
// Initialize M1 and M2...
// Compute M1 = M1 * M2
M1 *= M2;
}

Definition at line 632 of file vpHomogeneousMatrix.cpp.

References vpHomogeneousMatrix().

◆ operator,()

vpHomogeneousMatrix & vpHomogeneousMatrix::operator, ( double val)

Set the second and next element of the homogenous matrix.

Parameters
val: Value of the matrix second or next element.
Returns
An updated matrix.

The following example shows how to initialize an homogeneous matrix using this operator.

#include <visp3/core/vpHomogeneousMatrix.h>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
int main()
{
M << 0, 0, 1, 0.1,
0, 1, 0, 0.2,
1, 0, 0, 0.3;
std::cout << "M:\n" << M << std::endl;
N << 0, 0, 1, 0.1,
0, 1, 0, 0.2,
1, 0, 0, 0.3,
0, 0, 0, 1;
std::cout << "N:\n" << N << std::endl;
}

It produces the following printings:

M:
0 0 1 0.1
0 1 0 0.2
1 0 0 0.3
0 0 0 1
N:
0 0 1 0.1
0 1 0 0.2
1 0 0 0.3
0 0 0 1
See also
operator<<()

Definition at line 857 of file vpHomogeneousMatrix.cpp.

References vpArray2D< double >::data, vpException::dimensionError, m_index, vpArray2D< double >::size(), and vpHomogeneousMatrix().

◆ operator<<()

vpHomogeneousMatrix & vpHomogeneousMatrix::operator<< ( double val)

Set homogeneous matrix first element.

Parameters
val: Value of the matrix first element.
Returns
An updated matrix.

The following example shows how to initialize a rotation matrix using this operator.

#include <visp3/core/vpHomogeneousMatrix.h>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
int main()
{
M << 0, 0, 1, 0.1,
0, 1, 0, 0.2,
1, 0, 0, 0.3;
std::cout << "M:\n" << M << std::endl;
N << 0, 0, 1, 0.1,
0, 1, 0, 0.2,
1, 0, 0, 0.3,
0, 0, 0, 1;
std::cout << "N:\n" << N << std::endl;
}

It produces the following printings:

M:
0 0 1 0.1
0 1 0 0.2
1 0 0 0.3
0 0 0 1
N:
0 0 1 0.1
0 1 0 0.2
1 0 0 0.3
0 0 0 1
See also
operator,()

Definition at line 804 of file vpHomogeneousMatrix.cpp.

References vpArray2D< double >::data, m_index, and vpHomogeneousMatrix().

◆ operator=()

vpHomogeneousMatrix & vpHomogeneousMatrix::operator= ( const vpHomogeneousMatrix & M)

Copy operator that allows to set an homogeneous matrix from an other one.

Parameters
M: Matrix to copy.

Definition at line 556 of file vpHomogeneousMatrix.cpp.

References vpArray2D< Type >::rowPtrs, vpArray2D< double >::rowPtrs, and vpHomogeneousMatrix().

◆ operator[]()

double * vpArray2D< double >::operator[] ( unsigned int i)
inlineinherited

Set element $A_{ij} = x$ using A[i][j] = x.

Definition at line 696 of file vpArray2D.h.

◆ orthogonalizeRotation()

void vpHomogeneousMatrix::orthogonalizeRotation ( )

Perform orthogonalization of the rotation part of the homogeneous transformation.

Examples
catchHomogeneousMatrix.cpp.

Definition at line 1122 of file vpHomogeneousMatrix.cpp.

References insert().

Referenced by buildFrom(), and buildFrom().

◆ print()

void vpHomogeneousMatrix::print ( ) const

Print the matrix as a pose vector $({\bf t}^T \theta {\bf u}^T)$.

Definition at line 1130 of file vpHomogeneousMatrix.cpp.

◆ reshape()

void vpArray2D< double >::reshape ( unsigned int nrows,
unsigned int ncols )
inlineinherited
Examples
testMatrixInitialization.cpp.

Definition at line 545 of file vpArray2D.h.

◆ resize() [1/2]

void vpArray2D< double >::resize ( unsigned int nrows,
unsigned int ncols,
bool flagNullify = true,
bool recopy_ = true )
inlineinherited

Set the size of the array and initialize all the values to zero.

Parameters
nrows: number of rows.
ncols: number of column.
flagNullify: if true, then the array is re-initialized to 0 after resize. If false, the initial values from the common part of the array (common part between old and new version of the array) are kept. Default value is true.
recopy_: if true, will perform an explicit recopy of the old data.
Examples
catchParticleFilter.cpp, perfMatrixMultiplication.cpp, perfMatrixTranspose.cpp, testMatrix.cpp, testMatrixConditionNumber.cpp, testMatrixDeterminant.cpp, testMatrixInverse.cpp, testMatrixPseudoInverse.cpp, and testSvd.cpp.

Definition at line 448 of file vpArray2D.h.

Referenced by vpMatrix::diag(), vpMatrix::eye(), vpMatrix::init(), vpMatrix::operator,(), vpMatrix::operator<<(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::stack(), vpMatrix::stack(), vpMatrix::stack(), vpMatrix::svdEigen3(), and vpMatrix::svdOpenCV().

◆ resize() [2/2]

VP_NORETURN void vpHomogeneousMatrix::resize ( unsigned int nrows,
unsigned int ncols,
bool flagNullify = true )
inline

This function is not applicable to an homogeneous matrix that is always a 4-by-4 matrix.

Exceptions
vpException::fatalErrorWhen this function is called.

Definition at line 393 of file vpHomogeneousMatrix.h.

References vpException::fatalError.

◆ save() [1/3]

bool vpArray2D< double >::save ( const std::string & filename,
const vpArray2D< double > & A,
bool binary = false,
const char * header = "" )
inlinestaticinherited

Save a matrix to a file.

Parameters
filename: Absolute file name.
A: Array to be saved.
binary: If true the matrix is saved in a binary file, else a text file.
header: Optional line that will be saved at the beginning of the file.
Returns
Returns true if success.

Warning : If you save the matrix as in a text file the precision is less than if you save it in a binary file.

See also
load()

Definition at line 965 of file vpArray2D.h.

◆ save() [2/3]

void vpHomogeneousMatrix::save ( const std::string & filename) const

Save an homogeneous matrix in a file.

Parameters
filename: Output file name. The homogeneous matrix is saved as a 4 by 4 matrix.

The code below shows how to save an homogeneous matrix in a file.

// Construct an homogeneous matrix
vpRxyzVector r(M_PI, 0, -M_PI/4.);
// Save the content of the matrix in "homogeneous.dat"
M.save("homogeneous.dat");
Implementation of a rotation vector as Euler angle minimal representation.

The content of "homogeneous.dat" is the following:

* 0.7071067812  0.7071067812  0  1
* 0.7071067812  -0.7071067812  -1.224646799e-16  2
* -8.659560562e-17  8.659560562e-17  -1  3
* 0  0  0  1
* 
See also
save(std::ofstream &), load(const std::string &)

Definition at line 1088 of file vpHomogeneousMatrix.cpp.

References save().

Referenced by gen_java.JavaWrapperGenerator::finalize(), and gen_java.JavaWrapperGenerator::gen().

◆ save() [3/3]

void vpHomogeneousMatrix::save ( std::ofstream & f) const

Save an homogeneous matrix in an output file stream.

Parameters
f: Output file stream. The homogeneous matrix is saved as a 4 by 4 matrix.

The code below shows how to save an homogeneous matrix in a file.

// Construct an homogeneous matrix
vpRxyzVector r(M_PI, 0, -M_PI/4.);
// Save the content of the matrix in "homogeneous.dat"
std::ofstream f("homogeneous.dat");
M.save(f);

The content of "homogeneous.dat" is the following:

* 0.7071067812  0.7071067812  0  1
* 0.7071067812  -0.7071067812  -1.224646799e-16  2
* -8.659560562e-17  8.659560562e-17  -1  3
* 0  0  0  1
* 
See also
save(const std::string &), load(std::ifstream &)
Examples
servoAfma6Points2DCamVelocityEyeToHand.cpp, visp-compute-eye-in-hand-calibration.cpp, visp-compute-eye-to-hand-calibration.cpp, and visp-save-rs-dataset.cpp.

Definition at line 1078 of file vpHomogeneousMatrix.cpp.

References vpException::ioError.

Referenced by gen_java.JavaWrapperGenerator::finalize(), gen_java.JavaWrapperGenerator::gen(), and save().

◆ saveYAML()

bool vpArray2D< double >::saveYAML ( const std::string & filename,
const vpArray2D< double > & A,
const char * header = "" )
inlinestaticinherited

Save an array in a YAML-formatted file.

Parameters
filename: absolute file name.
A: array to be saved in the file.
header: optional lines that will be saved at the beginning of the file. Should be YAML-formatted and will adapt to the indentation if any.
Returns
Returns true if success.

Here is an example of outputs.

vpArray2D::saveYAML("matrix.yml", M, "example: a YAML-formatted header");
vpArray2D::saveYAML("matrixIndent.yml", M, "example:\n - a YAML-formatted \
header\n - with inner indentation");
static bool saveYAML(const std::string &filename, const vpArray2D< Type > &A, const char *header="")
Definition vpArray2D.h:1061

Content of matrix.yml:

example: a YAML-formatted header
rows: 3
cols: 4
- [0, 0, 0, 0]
- [0, 0, 0, 0]
- [0, 0, 0, 0]

Content of matrixIndent.yml:

example:
- a YAML-formatted header
- with inner indentation
rows: 3
cols: 4
- [0, 0, 0, 0]
- [0, 0, 0, 0]
- [0, 0, 0, 0]
See also
loadYAML()
Examples
visp-acquire-franka-calib-data.cpp, and visp-acquire-universal-robots-calib-data.cpp.

Definition at line 1061 of file vpArray2D.h.

◆ setIdentity()

void vpHomogeneousMatrix::setIdentity ( )
Deprecated
You should rather use eye().
Deprecated
You should rather use eye().

Set homogeneous matrix to identity.

See also
eye()

Definition at line 1357 of file vpHomogeneousMatrix.cpp.

References eye().

◆ size()

◆ t()

◆ view()

vpArray2D< double > vpArray2D< double >::view ( const vpArray2D< double > & A)
inlinestaticinherited

Creates a view of the Matrix A. A view shares the same underlying memory as the original array. It can be written into, modifying the original data. However, the array cannot be resized.

When you use this method, it is your responsibility to ensure that the lifespan of the view does not exceed the lifespan of the original array.

Parameters
Athe array to view
Returns
vpArray2D<T>

Definition at line 324 of file vpArray2D.h.

◆ from_json

void from_json ( const nlohmann::json & j,
vpHomogeneousMatrix & T )
friend

Definition at line 447 of file vpHomogeneousMatrix.h.

References from_json, and vpHomogeneousMatrix().

Referenced by from_json.

◆ operator==() [1/2]

bool operator== ( const vpArray2D< double > & A) const
related

◆ operator==() [2/2]

bool operator== ( const vpArray2D< float > & A) const
related

◆ to_json

void to_json ( nlohmann::json & j,
const vpHomogeneousMatrix & T )
friend

Definition at line 442 of file vpHomogeneousMatrix.h.

References to_json, and vpHomogeneousMatrix().

Referenced by to_json.

◆ vpGEMM()

void vpGEMM ( const vpArray2D< double > & A,
const vpArray2D< double > & B,
const double & alpha,
const vpArray2D< double > & C,
const double & beta,
vpArray2D< double > & D,
const unsigned int & ops = 0 )
related

This function performs generalized matrix multiplication: D = alpha*op(A)*op(B) + beta*op(C), where op(X) is X or X^T. Operation on A, B and C matrices is described by enumeration vpGEMMmethod().

For example, to compute D = alpha*A^T*B^T+beta*C we need to call :

vpGEMM(A, B, alpha, C, beta, D, VP_GEMM_A_T + VP_GEMM_B_T);
void vpGEMM(const vpArray2D< double > &A, const vpArray2D< double > &B, const double &alpha, const vpArray2D< double > &C, const double &beta, vpArray2D< double > &D, const unsigned int &ops=0)
Definition vpGEMM.h:414

If C is not used, vpGEMM must be called using an empty array null. Thus to compute D = alpha*A^T*B, we have to call:

vpGEMM(A, B, alpha, null, 0, D, VP_GEMM_B_T);
Exceptions
vpException::incorrectMatrixSizeErrorif the sizes of the matrices do not allow the operations.
Parameters
A: An array that could be a vpMatrix.
B: An array that could be a vpMatrix.
alpha: A scalar.
C: An array that could be a vpMatrix.
beta: A scalar.
D: The resulting array that could be a vpMatrix.
ops: A scalar describing operation applied on the matrices. Possible values are the one defined in vpGEMMmethod(): VP_GEMM_A_T, VP_GEMM_B_T, VP_GEMM_C_T.

Definition at line 414 of file vpGEMM.h.

References vpException::functionNotImplementedError, and vpArray2D().

◆ vpGEMMmethod

enum vpGEMMmethod
related

Enumeration of the operations applied on matrices in vpGEMM() function.

Operations are :

  • VP_GEMM_A_T to use the transpose matrix of A instead of the matrix A
  • VP_GEMM_B_T to use the transpose matrix of B instead of the matrix B
  • VP_GEMM_C_T to use the transpose matrix of C instead of the matrix C

Definition at line 53 of file vpGEMM.h.

Member Data Documentation

◆ colNum

unsigned int vpArray2D< double >::colNum
protectedinherited

Number of columns in the array.

Definition at line 1203 of file vpArray2D.h.

Referenced by vpMatrix::AAt(), vpMatrix::AtA(), vpMatrix::choleskyByLapack(), vpMatrix::choleskyByOpenCV(), vpColVector::clear(), vpMatrix::clear(), vpRowVector::clear(), vpMatrix::dampedInverse(), vpMatrix::detByLU(), vpMatrix::detByLUEigen3(), vpMatrix::detByLULapack(), vpMatrix::detByLUOpenCV(), vpMatrix::diag(), vpMatrix::eigenValues(), vpMatrix::eigenValues(), vpMatrix::expm(), vpRowVector::extract(), vpMatrix::eye(), vpMatrix::getDiag(), vpMatrix::getRow(), vpMatrix::getRow(), vpColVector::hadamard(), vpMatrix::hadamard(), vpRowVector::hadamard(), vpMatrix::infinityNorm(), vpSubColVector::init(), vpSubMatrix::init(), vpSubRowVector::init(), vpMatrix::insert(), vpRowVector::insert(), vpMatrix::inverseByCholeskyLapack(), vpMatrix::inverseByCholeskyOpenCV(), vpMatrix::inverseByLU(), vpMatrix::inverseByLUEigen3(), vpMatrix::inverseByLULapack(), vpMatrix::inverseByLUOpenCV(), vpMatrix::inverseByQRLapack(), vpMatrix::inverseTriangular(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpRotationMatrix::operator*(), vpRotationMatrix::operator*(), vpRowVector::operator*(), vpRowVector::operator*(), vpRowVector::operator*(), vpMatrix::operator*=(), vpRotationMatrix::operator*=(), vpRowVector::operator*=(), vpRowVector::operator+(), vpMatrix::operator+=(), vpMatrix::operator+=(), vpRowVector::operator+=(), vpMatrix::operator,(), vpRowVector::operator,(), vpRowVector::operator-(), vpRowVector::operator-(), vpMatrix::operator-=(), vpMatrix::operator-=(), vpRowVector::operator-=(), vpMatrix::operator/(), vpRowVector::operator/(), vpMatrix::operator/=(), vpRowVector::operator/=(), vpColVector::operator<<(), vpMatrix::operator<<(), vpMatrix::operator=(), vpRowVector::operator=(), vpRowVector::operator=(), vpRowVector::operator=(), vpSubMatrix::operator=(), vpSubMatrix::operator=(), vpSubMatrix::operator=(), vpSubRowVector::operator=(), vpSubRowVector::operator=(), vpSubRowVector::operator=(), operator==(), operator==(), vpColVector::operator==(), vpRowVector::operator==(), vpMatrix::qr(), vpRowVector::reshape(), vpMatrix::setIdentity(), vpMatrix::solveByQR(), vpMatrix::solveByQR(), vpMatrix::solveBySVD(), vpMatrix::stack(), vpMatrix::stack(), vpMatrix::stack(), vpRowVector::stack(), vpMatrix::stackColumns(), vpMatrix::stackColumns(), vpMatrix::stackRows(), vpMatrix::stackRows(), vpMatrix::sum(), vpRowVector::sum(), vpMatrix::sumSquare(), vpRowVector::sumSquare(), vpMatrix::svdEigen3(), vpMatrix::svdLapack(), vpRowVector::t(), and vpMatrix::transpose().

◆ data

double* vpArray2D< double >::data
inherited

Address of the first element of the data array.

Examples
catchQuaternion.cpp, catchRotation.cpp, perfMatrixMultiplication.cpp, testDisplacement.cpp, testMatrix.cpp, testMatrixInitialization.cpp, testUniversalRobotsGetData.cpp, and tutorial-bridge-opencv-matrix.cpp.

Definition at line 149 of file vpArray2D.h.

Referenced by vpMatrix::AAt(), vpMatrix::AtA(), vpHomogeneousMatrix::buildFrom(), vpHomogeneousMatrix::buildFrom(), vpQuaternionVector::buildFrom(), vpQuaternionVector::buildFrom(), vpRxyzVector::buildFrom(), vpRxyzVector::buildFrom(), vpRxyzVector::buildFrom(), vpRzyxVector::buildFrom(), vpRzyxVector::buildFrom(), vpRzyxVector::buildFrom(), vpRzyzVector::buildFrom(), vpRzyzVector::buildFrom(), vpRzyzVector::buildFrom(), vpThetaUVector::buildFrom(), vpThetaUVector::buildFrom(), vpThetaUVector::buildFrom(), vpThetaUVector::buildFrom(), vpThetaUVector::buildFrom(), vpSubColVector::checkParentStatus(), vpSubMatrix::checkParentStatus(), vpSubRowVector::checkParentStatus(), vpColVector::clear(), vpMatrix::clear(), vpRowVector::clear(), vpHomogeneousMatrix::convert(), vpHomogeneousMatrix::convert(), vpMatrix::detByLUEigen3(), vpMatrix::detByLUOpenCV(), vpMatrix::expm(), vpThetaUVector::extract(), vpMatrix::frobeniusNorm(), vpMatrix::getRow(), vpThetaUVector::getTheta(), vpThetaUVector::getU(), vpColVector::hadamard(), vpMatrix::hadamard(), vpRowVector::hadamard(), vpSubColVector::init(), vpSubMatrix::init(), vpSubRowVector::init(), vpColVector::insert(), vpMatrix::insert(), vpMatrix::inverseByCholeskyOpenCV(), vpMatrix::inverseByLUEigen3(), vpMatrix::inverseByLUOpenCV(), vpHomogeneousMatrix::isValid(), vpColVector::operator*(), vpHomography::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpRowVector::operator*(), vpRowVector::operator*(), vpTranslationVector::operator*(), vpColVector::operator,(), vpHomogeneousMatrix::operator,(), vpRotationMatrix::operator,(), vpRotationVector::operator,(), vpRowVector::operator,(), vpTranslationVector::operator,(), vpColVector::operator-(), vpRowVector::operator-(), vpTranslationVector::operator-(), vpColVector::operator/(), vpHomography::operator/(), vpRowVector::operator/(), vpTranslationVector::operator/(), vpHomography::operator/=(), vpColVector::operator<<(), vpHomogeneousMatrix::operator<<(), vpRotationMatrix::operator<<(), vpRotationVector::operator<<(), vpRowVector::operator<<(), vpTranslationVector::operator<<(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpQuaternionVector::operator=(), vpQuaternionVector::operator=(), vpRotationMatrix::operator=(), vpRotationVector::operator=(), vpRowVector::operator=(), vpRowVector::operator=(), vpRowVector::operator=(), vpRxyzVector::operator=(), vpRxyzVector::operator=(), vpRxyzVector::operator=(), vpRzyxVector::operator=(), vpRzyxVector::operator=(), vpRzyxVector::operator=(), vpRzyzVector::operator=(), vpRzyzVector::operator=(), vpRzyzVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubRowVector::operator=(), vpSubRowVector::operator=(), vpSubRowVector::operator=(), vpSubRowVector::operator=(), vpThetaUVector::operator=(), vpThetaUVector::operator=(), vpThetaUVector::operator=(), vpTranslationVector::operator=(), vpTranslationVector::operator=(), vpTranslationVector::operator=(), vpTranslationVector::operator=(), operator==(), operator==(), vpColVector::operator==(), vpColVector::operator==(), vpRowVector::operator==(), vpColVector::operator[](), vpColVector::operator[](), vpPoseVector::operator[](), vpPoseVector::operator[](), vpRotationVector::operator[](), vpRotationVector::operator[](), vpRowVector::operator[](), vpRowVector::operator[](), vpTranslationVector::operator[](), vpTranslationVector::operator[](), vpRotationMatrix::orthogonalize(), vpMatrix::qr(), vpColVector::reshape(), vpRowVector::reshape(), vpQuaternionVector::set(), vpMatrix::stack(), vpMatrix::stack(), vpMatrix::stackRows(), vpColVector::sum(), vpColVector::sumSquare(), vpMatrix::svdEigen3(), vpMatrix::svdLapack(), vpMatrix::svdOpenCV(), vpColVector::t(), vpPoseVector::t(), vpRotationVector::t(), vpRowVector::t(), vpTranslationVector::t(), vpColVector::toStdVector(), vpPoseVector::toStdVector(), vpRotationVector::toStdVector(), vpRowVector::toStdVector(), vpMatrix::transpose(), vpColVector::view(), vpMatrix::view(), vpColVector::vpColVector(), vpHomogeneousMatrix::vpHomogeneousMatrix(), vpQuaternionVector::w(), vpQuaternionVector::w(), vpQuaternionVector::x(), vpQuaternionVector::x(), vpQuaternionVector::y(), vpQuaternionVector::y(), vpQuaternionVector::z(), vpQuaternionVector::z(), vpSubColVector::~vpSubColVector(), vpSubMatrix::~vpSubMatrix(), and vpSubRowVector::~vpSubRowVector().

◆ dsize

◆ isMemoryOwner

bool vpArray2D< double >::isMemoryOwner
protectedinherited

Whether this array owns the memory it points to.

Definition at line 1209 of file vpArray2D.h.

Referenced by vpColVector::clear(), and vpRowVector::clear().

◆ isRowPtrsOwner

bool vpArray2D< double >::isRowPtrsOwner
protectedinherited

Whether this array owns the row pointers.

Definition at line 1211 of file vpArray2D.h.

◆ jsonTypeName

VP_ATTRIBUTE_NO_DESTROY const std::string vpHomogeneousMatrix::jsonTypeName = "vpHomogeneousMatrix"
static

Definition at line 407 of file vpHomogeneousMatrix.h.

◆ m_index

◆ rowNum

unsigned int vpArray2D< double >::rowNum
protectedinherited

Number of rows in the array.

Definition at line 1201 of file vpArray2D.h.

Referenced by vpMatrix::AAt(), vpMatrix::AtA(), vpMatrix::choleskyByLapack(), vpMatrix::choleskyByOpenCV(), vpColVector::clear(), vpMatrix::clear(), vpRowVector::clear(), vpMatrix::detByLU(), vpMatrix::detByLUEigen3(), vpMatrix::detByLULapack(), vpMatrix::detByLUOpenCV(), vpMatrix::diag(), vpMatrix::eigenValues(), vpMatrix::eigenValues(), vpMatrix::expm(), vpColVector::extract(), vpMatrix::eye(), vpMatrix::getCol(), vpMatrix::getDiag(), vpMatrix::getRow(), vpColVector::hadamard(), vpMatrix::hadamard(), vpRowVector::hadamard(), vpColVector::infinityNorm(), vpMatrix::infinityNorm(), vpSubColVector::init(), vpSubMatrix::init(), vpSubRowVector::init(), vpMatrix::insert(), vpMatrix::inverseByCholeskyLapack(), vpMatrix::inverseByCholeskyOpenCV(), vpMatrix::inverseByLU(), vpMatrix::inverseByLUEigen3(), vpMatrix::inverseByLULapack(), vpMatrix::inverseByLUOpenCV(), vpMatrix::inverseByQRLapack(), vpMatrix::inverseTriangular(), vpColVector::operator*(), vpColVector::operator*(), vpColVector::operator*(), vpColVector::operator*(), vpHomogeneousMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpRotationMatrix::operator*(), vpRotationMatrix::operator*(), vpTranslationVector::operator*(), vpColVector::operator*=(), vpMatrix::operator*=(), vpRotationMatrix::operator*=(), vpTranslationVector::operator*=(), vpColVector::operator+(), vpColVector::operator+=(), vpColVector::operator+=(), vpMatrix::operator+=(), vpMatrix::operator+=(), vpColVector::operator,(), vpColVector::operator-(), vpColVector::operator-(), vpColVector::operator-=(), vpColVector::operator-=(), vpMatrix::operator-=(), vpMatrix::operator-=(), vpColVector::operator/(), vpMatrix::operator/(), vpColVector::operator/=(), vpMatrix::operator/=(), vpTranslationVector::operator/=(), vpColVector::operator<<(), vpMatrix::operator<<(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpRowVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubMatrix::operator=(), vpSubMatrix::operator=(), vpSubMatrix::operator=(), vpSubRowVector::operator=(), vpSubRowVector::operator=(), vpSubRowVector::operator=(), vpSubRowVector::operator=(), vpTranslationVector::operator=(), vpTranslationVector::operator=(), operator==(), operator==(), vpColVector::operator==(), vpColVector::operator==(), vpRowVector::operator==(), vpMatrix::qr(), vpColVector::reshape(), vpMatrix::setIdentity(), vpColVector::stack(), vpMatrix::stack(), vpMatrix::stack(), vpMatrix::stack(), vpMatrix::stackColumns(), vpMatrix::stackColumns(), vpMatrix::stackRows(), vpMatrix::stackRows(), vpColVector::sum(), vpMatrix::sum(), vpColVector::sumSquare(), vpMatrix::sumSquare(), vpRotationVector::sumSquare(), vpTranslationVector::sumSquare(), vpMatrix::svdEigen3(), vpMatrix::svdLapack(), vpColVector::t(), vpPoseVector::t(), vpTranslationVector::t(), and vpMatrix::transpose().

◆ rowPtrs

double** vpArray2D< double >::rowPtrs
protectedinherited

Address of the first element of each rows.

Definition at line 1205 of file vpArray2D.h.

Referenced by vpMatrix::AAt(), vpColVector::clear(), vpMatrix::clear(), vpRowVector::clear(), vpMatrix::infinityNorm(), vpColVector::init(), vpMatrix::init(), vpRowVector::init(), vpSubColVector::init(), vpSubMatrix::init(), vpSubRowVector::init(), vpForceTwistMatrix::operator*(), vpForceTwistMatrix::operator*(), vpForceTwistMatrix::operator*(), vpHomogeneousMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpRotationMatrix::operator*(), vpRotationMatrix::operator*(), vpRotationMatrix::operator*(), vpRotationMatrix::operator*(), vpVelocityTwistMatrix::operator*(), vpVelocityTwistMatrix::operator*(), vpVelocityTwistMatrix::operator*(), vpMatrix::operator*=(), vpRotationMatrix::operator*=(), vpMatrix::operator+=(), vpMatrix::operator+=(), vpMatrix::operator,(), vpMatrix::operator-=(), vpMatrix::operator-=(), vpMatrix::operator/(), vpMatrix::operator/=(), vpColVector::operator<<(), vpMatrix::operator<<(), vpMatrix::operator<<(), vpForceTwistMatrix::operator=(), vpHomogeneousMatrix::operator=(), vpMatrix::operator=(), vpRotationMatrix::operator=(), vpRowVector::operator=(), vpSubMatrix::operator=(), vpSubMatrix::operator=(), vpSubMatrix::operator=(), vpVelocityTwistMatrix::operator=(), vpMatrix::stack(), vpMatrix::stackColumns(), vpMatrix::sum(), vpRowVector::sum(), vpMatrix::sumSquare(), vpRotationVector::sumSquare(), vpRowVector::sumSquare(), and vpTranslationVector::sumSquare().