Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches

#include <vpHomography.h>

Inheritance diagram for vpHomography:

Public Member Functions

 vpHomography ()
 vpHomography (const vpHomography &H)
 vpHomography (const vpHomogeneousMatrix &aMb, const vpPlane &bP)
 vpHomography (const vpRotationMatrix &aRb, const vpTranslationVector &atb, const vpPlane &bP)
 vpHomography (const vpThetaUVector &tu, const vpTranslationVector &atb, const vpPlane &bP)
 vpHomography (const vpPoseVector &arb, const vpPlane &bP)
vpHomographybuildFrom (const vpRotationMatrix &aRb, const vpTranslationVector &atb, const vpPlane &bP)
vpHomographybuildFrom (const vpThetaUVector &tu, const vpTranslationVector &atb, const vpPlane &bP)
vpHomographybuildFrom (const vpPoseVector &arb, const vpPlane &bP)
vpHomographybuildFrom (const vpHomogeneousMatrix &aMb, const vpPlane &bP)
vpHomography collineation2homography (const vpCameraParameters &cam) const
vpMatrix convert () const
void computeDisplacement (vpRotationMatrix &aRb, vpTranslationVector &atb, vpColVector &n)
void computeDisplacement (const vpColVector &nd, vpRotationMatrix &aRb, vpTranslationVector &atb, vpColVector &n)
double det () const
void eye ()
vpHomography homography2collineation (const vpCameraParameters &cam) const
vpHomography inverse (double sv_threshold=1e-16, unsigned int *rank=nullptr) const
void inverse (vpHomography &bHa) const
void load (std::ifstream &f)
vpHomography operator* (const vpHomography &H) const
vpHomography operator* (const double &v) const
vpColVector operator* (const vpColVector &b) const
vpPoint operator* (const vpPoint &b_P) const
vpHomography operator/ (const double &v) const
vpHomographyoperator/= (double v)
vpHomographyoperator= (const vpHomography &H)
vpHomographyoperator= (const vpMatrix &H)
vpImagePoint projection (const vpImagePoint &ipb)
VP_NORETURN void resize (unsigned int nrows, unsigned int ncols, bool flagNullify=true)
void save (std::ofstream &f) const
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 void DLT (const std::vector< double > &xb, const std::vector< double > &yb, const std::vector< double > &xa, const std::vector< double > &ya, vpHomography &aHb, bool normalization=true)
static void HLM (const std::vector< double > &xb, const std::vector< double > &yb, const std::vector< double > &xa, const std::vector< double > &ya, bool isplanar, vpHomography &aHb)
static bool ransac (const std::vector< double > &xb, const std::vector< double > &yb, const std::vector< double > &xa, const std::vector< double > &ya, vpHomography &aHb, std::vector< bool > &inliers, double &residual, unsigned int nbInliersConsensus, double threshold, bool normalization=true)
static vpImagePoint project (const vpCameraParameters &cam, const vpHomography &bHa, const vpImagePoint &iPa)
static vpPoint project (const vpHomography &bHa, const vpPoint &Pa)
static void robust (const std::vector< double > &xb, const std::vector< double > &yb, const std::vector< double > &xa, const std::vector< double > &ya, vpHomography &aHb, std::vector< bool > &inliers, double &residual, double weights_threshold=0.4, unsigned int niter=4, bool normalization=true)
static vpArray2D< double > view (const vpArray2D< double > &A)

Public Attributes

double * data

(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

Inherited I/O from vpArray2D with Static Public Member Functions

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)
unsigned int rowNum
unsigned int colNum
double ** rowPtrs
unsigned int dsize
bool isMemoryOwner
bool isRowPtrsOwner

Detailed Description

Implementation of an homography and operations on homographies.

This class aims to compute the homography wrt. two images [36].

The vpHomography class is derived from vpArray2D<double>.

These two images are both described by a set of points. The 2 sets (one per image) are sets of corresponding points : for a point in a image, there is the corresponding point (image of the same 3D point) in the other image points set. These 2 sets are the only data needed to compute the homography. One method used is the one introduced by Ezio Malis during his PhD [30]. A normalization is carried out on this points in order to improve the conditioning of the problem, what leads to improve the stability of the result.

Store and compute the homography such that

\‍[ ^a{\bf p} = ^a{\bf H}_b\; ^b{\bf p}
\‍]

with

\‍[ * ^a{\bf H}_b = ^a{\bf R}_b + \frac{^a{\bf t}_b}{^bd}
 { ^b{\bf n}^T}
\‍]

The Tutorial: Homography estimation from points explains how to use this class.

The example below shows also how to manipulate this class to first compute a ground truth homography from camera poses, project pixel coordinates points using an homography and lastly estimate an homography from a subset of 4 matched points in frame a and frame b respectively.

#include <visp3/core/vpHomogeneousMatrix.h>
#include <visp3/core/vpMath.h>
#include <visp3/core/vpMeterPixelConversion.h>
#include <visp3/vision/vpHomography.h>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
int main()
{
// Initialize in the object frame the coordinates in meters of 4 points that
// belong to a planar object
vpPoint Po[4];
Po[0].setWorldCoordinates(-0.1, -0.1, 0);
Po[1].setWorldCoordinates( 0.2, -0.1, 0);
Po[2].setWorldCoordinates( 0.1, 0.1, 0);
Po[3].setWorldCoordinates(-0.1, 0.3, 0);
// Initialize the pose between camera frame a and object frame o
vpHomogeneousMatrix aMo(0, 0, 1, 0, 0, 0); // Camera is 1 meter far
// Initialize the pose between camera frame a and camera frame
// b. These two frames correspond for example to two successive
// camera positions
vpHomogeneousMatrix aMb(0.2, 0.1, 0, 0, 0, vpMath::rad(2));
// Compute the pose between camera frame b and object frame
vpHomogeneousMatrix bMo = aMb.inverse() * aMo;
// Initialize camera intrinsic parameters
// Compute the coordinates in pixels of the 4 object points in the
// camera frame a
vpPoint Pa[4];
std::vector<double> xa(4), ya(4); // Coordinates in pixels of the points in frame a
for(int i=0 ; i < 4 ; ++i) {
Pa[i] = Po[i]; Pa[i].project(aMo); // Project the points from object frame to camera frame a
Pa[i].get_x(), Pa[i].get_y(),
xa[i], ya[i]);
}
// Compute the coordinates in pixels of the 4 object points in the
// camera frame b
vpPoint Pb[4];
std::vector<double> xb(4), yb(4); // Coordinates in pixels of the points in frame b
for(int i=0 ; i < 4 ; ++i) {
Pb[i] = Po[i]; Pb[i].project(bMo); // Project the points from object frame to camera frame a
}
// Compute equation of the 3D plane containing the points in camera frame b
vpPlane bP(Pb[0], Pb[1], Pb[2]);
// Compute the corresponding ground truth homography
vpHomography aHb(aMb, bP);
std::cout << "Ground truth homography aHb: \n" << aHb<< std::endl;
// Compute the coordinates of the points in frame b using the ground
// truth homography and the coordinates of the points in frame a
vpHomography bHa = aHb.inverse();
for(int i = 0; i < 4 ; ++i){
double inv_z = 1. / (bHa[2][0] * xa[i] + bHa[2][1] * ya[i] + bHa[2][2]);
xb[i] = (bHa[0][0] * xa[i] + bHa[0][1] * ya[i] + bHa[0][2]) * inv_z;
yb[i] = (bHa[1][0] * xa[i] + bHa[1][1] * ya[i] + bHa[1][2]) * inv_z;
}
// Estimate the homography from 4 points coordinates expressed in pixels
vpHomography::DLT(xb, yb, xa, ya, aHb, true);
aHb /= aHb[2][2]; // Apply a scale factor to have aHb[2][2] = 1
std::cout << "Estimated homography aHb: \n" << aHb<< std::endl;
}
Generic class defining intrinsic camera parameters.
Implementation of an homogeneous matrix and operations on such kind of matrices.
vpHomogeneousMatrix inverse() const
static void DLT(const std::vector< double > &xb, const std::vector< double > &yb, const std::vector< double > &xa, const std::vector< double > &ya, vpHomography &aHb, bool normalization=true)
static double rad(double deg)
Definition vpMath.h:129
static void convertPoint(const vpCameraParameters &cam, const double &x, const double &y, double &u, double &v)
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
Definition vpPoint.h:79
void setWorldCoordinates(double oX, double oY, double oZ)
Definition vpPoint.cpp:116

Tutorials & Examples

Tutorials
If you are interested in using this class, you may have a look at:

Examples
homographyHLM2DObject.cpp, homographyHLM3DObject.cpp, homographyHartleyDLT2DObject.cpp, homographyRansac2DObject.cpp, testDisplacement.cpp, tutorial-homography-from-points.cpp, tutorial-matching-keypoint-homography.cpp, and tutorial-template-tracker.cpp.

Definition at line 179 of file vpHomography.h.

Constructor & Destructor Documentation

◆ vpHomography() [1/6]

◆ vpHomography() [2/6]

vpHomography::vpHomography ( const vpHomography & H)

Initialize an homography from another homography.

Definition at line 55 of file vpHomography.cpp.

References vpArray2D< double >::vpArray2D(), and vpHomography().

◆ vpHomography() [3/6]

vpHomography::vpHomography ( const vpHomogeneousMatrix & aMb,
const vpPlane & bP )

Construction from translation and rotation and a plane.

Definition at line 57 of file vpHomography.cpp.

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

◆ vpHomography() [4/6]

vpHomography::vpHomography ( const vpRotationMatrix & aRb,
const vpTranslationVector & atb,
const vpPlane & bP )

Construction from translation and rotation and a plane.

Definition at line 68 of file vpHomography.cpp.

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

◆ vpHomography() [5/6]

vpHomography::vpHomography ( const vpThetaUVector & tu,
const vpTranslationVector & atb,
const vpPlane & bP )

Construction from translation and rotation and a plane.

Definition at line 62 of file vpHomography.cpp.

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

◆ vpHomography() [6/6]

vpHomography::vpHomography ( const vpPoseVector & arb,
const vpPlane & bP )

Construction from translation and rotation and a plane.

Definition at line 74 of file vpHomography.cpp.

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

Member Function Documentation

◆ buildFrom() [1/4]

vpHomography & vpHomography::buildFrom ( const vpHomogeneousMatrix & aMb,
const vpPlane & bP )

Construction from homogeneous matrix and a plane.

Definition at line 79 of file vpHomography.cpp.

References vpHomography().

◆ buildFrom() [2/4]

vpHomography & vpHomography::buildFrom ( const vpPoseVector & arb,
const vpPlane & bP )

Construction from translation and rotation and a plane.

Definition at line 105 of file vpHomography.cpp.

References vpPoseVector::buildFrom(), and vpHomography().

◆ buildFrom() [3/4]

vpHomography & vpHomography::buildFrom ( const vpRotationMatrix & aRb,
const vpTranslationVector & atb,
const vpPlane & bP )

Construction from translation and rotation and a plane.

Examples
testDisplacement.cpp.

Definition at line 96 of file vpHomography.cpp.

References vpHomography().

Referenced by vpHomography(), vpHomography(), vpHomography(), and vpHomography().

◆ buildFrom() [4/4]

vpHomography & vpHomography::buildFrom ( const vpThetaUVector & tu,
const vpTranslationVector & atb,
const vpPlane & bP )

Construction from translation and rotation and a plane.

Definition at line 87 of file vpHomography.cpp.

References vpHomography().

◆ collineation2homography()

vpHomography vpHomography::collineation2homography ( const vpCameraParameters & cam) const

Transform an homography from pixel space to calibrated domain.

Given homography $\bf G$ corresponding to the collineation matrix in the pixel space, compute the homography matrix $\bf H$ in the Euclidean space or calibrated domain using:

\‍[ {\bf H} = {\bf K}^{-1} {\bf G} {\bf K} \‍]

Parameters
[in]cam: Camera parameters used to fill ${\bf K}$ matrix such as

\‍[{\bf K} =
\left[ \begin{array}{ccc}
p_x & 0   & u_0  \\
0   & p_y & v_0 \\
0   & 0   & 1
\end{array}\right]
\‍]

Returns
The corresponding homography matrix $\bf H$ in the Euclidean space or calibrated domain.
See also
homography2collineation()

Definition at line 609 of file vpHomography.cpp.

References vpHomography().

◆ computeDisplacement() [1/2]

void vpHomography::computeDisplacement ( const vpColVector & nd,
vpRotationMatrix & aRb,
vpTranslationVector & atb,
vpColVector & n )

Compute the camera displacement between two images from the homography ${^a}{\bf H}_b $ which is here an implicit parameter (*this).

Camera displacement between $ {^a}{\bf p} $ and $ {^a}{\bf p} $ is represented as a rotation matrix $ {^a}{\bf R}_b $ and a translation vector $ ^a{\bf t}_b $ from which an homogeneous matrix can be build (vpHomogeneousMatrix).

Parameters
nd: Input normal vector to the plane used to compar with the normal vector n extracted from the homography.
aRb: Rotation matrix as an output $ {^a}{\bf R}_b $.
atb: Translation vector as an output $ ^a{\bf t}_b $.
n: Normal vector to the plane as an output.

Definition at line 58 of file vpHomographyExtract.cpp.

References computeDisplacement().

◆ computeDisplacement() [2/2]

void vpHomography::computeDisplacement ( vpRotationMatrix & aRb,
vpTranslationVector & atb,
vpColVector & n )

Compute the camera displacement between two images from the homography ${^a}{\bf H}_b $ which is here an implicit parameter (*this).

Parameters
aRb: Rotation matrix as an output $ {^a}{\bf R}_b $.
atb: Translation vector as an output $ ^a{\bf t}_b $.
n: Normal vector to the plane as an output.
Examples
homographyHLM2DObject.cpp, homographyHLM3DObject.cpp, homographyHartleyDLT2DObject.cpp, testDisplacement.cpp, and tutorial-homography-from-points.cpp.

Definition at line 47 of file vpHomographyExtract.cpp.

References computeDisplacement().

Referenced by computeDisplacement(), and computeDisplacement().

◆ 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()

vpMatrix vpHomography::convert ( ) const

Converts an homography to a matrix.

Returns
The 3x3 matrix corresponding to the homography.

Definition at line 596 of file vpHomography.cpp.

Referenced by vpMbtDistanceKltPoints::computeHomography().

◆ det()

double vpHomography::det ( ) const

Return homography determinant.

Definition at line 382 of file vpHomography.cpp.

◆ DLT()

BEGIN_VISP_NAMESPACE void vpHomography::DLT ( const std::vector< double > & xb,
const std::vector< double > & yb,
const std::vector< double > & xa,
const std::vector< double > & ya,
vpHomography & aHb,
bool normalization = true )
static

From couples of matched points $^a{\bf p}=(x_a,y_a,1)$ in image a and $^b{\bf p}=(x_b,y_b,1)$ in image b with homogeneous coordinates, computes the homography matrix by resolving $^a{\bf p} = ^a{\bf H}_b\;
^b{\bf p}$ using the DLT (Direct Linear Transform) algorithm.

At least 4 couples of points are needed.

To do so, we use the DLT algorithm on the data, ie we resolve the linear system by SDV : $\bf{Ah} =0$ where $\bf{h}$ is the vector with the terms of $^a{\bf H}_b$ and $\mathbf{A}$ depends on the points coordinates.

For each point, in homogeneous coordinates we have:

\‍[^a{\bf p} = ^a{\bf H}_b\; ^b{\bf p}
\‍]

which is equivalent to:

\‍[^a{\bf p} \times {^a{\bf H}_b \; ^b{\bf p}}  =0
\‍]

If we note $\mathbf{h}_j^T$ the $j^{\textrm{th}}$ line of $^a{\bf H}_b$, we can write:

\‍[ ^a{\bf H}_b \; ^b{\bf p}  = \left(
\begin{array}{c}\mathbf{h}_1^T \;^b{\bf p} \\\mathbf{h}_2^T \; ^b{\bf p}
\\\mathbf{h}_3^T \;^b{\bf p} \end{array}\right) \‍]

Setting $^a{\bf p}=(x_{a},y_{a},w_{a})$, the cross product can be rewritten by:

\‍[ ^a{\bf p} \times ^a{\bf H}_b \; ^b{\bf p}  =\left(
\begin{array}{c}y_{a}\mathbf{h}_3^T \; ^b{\bf p}-w_{a}\mathbf{h}_2^T \;
^b{\bf p} \\w_{a}\mathbf{h}_1^T \; ^b{\bf p} -x_{a}\mathbf{h}_3^T \; ^b{\bf
p} \\x_{a}\mathbf{h}_2^T \; ^b{\bf p}- y_{a}\mathbf{h}_1^T \; ^b{\bf
p}\end{array}\right) \‍]

\‍[\underbrace{\left( \begin{array}{ccc}\mathbf{0}^T & -w_{a} \; ^b{\bf p}^T
& y_{a} \; ^b{\bf p}^T     \\     w_{a}
\; ^b{\bf p}^T&\mathbf{0}^T & -x_{a} \; ^b{\bf p}^T      \\
-y_{a} \; ^b{\bf p}^T & x_{a} \; ^b{\bf p}^T &
\mathbf{0}^T\end{array}\right)}_{\mathbf{A}_i (3\times 9)}
\underbrace{\left( \begin{array}{c}\mathbf{h}_{1}^{T}      \\
\mathbf{h}_{2}^{T}\\\mathbf{h}_{3}^{T}\end{array}\right)}_{\mathbf{h}
(9\times 1)}=0 \‍]

leading to an homogeneous system to be solved: $\mathbf{A}\mathbf{h}=0$ with $\mathbf{A}=\left(\mathbf{A}_1^T, ...,
\mathbf{A}_i^T, ..., \mathbf{A}_n^T \right)^T$.

It can be solved using an SVD decomposition:

\‍[\bf A = UDV^T \‍]

h is the column of V associated with the smallest singular value of A

Parameters
[in]xb: Vector that contains the coordinates along x-axis (horizontal) of matched points in image b. These coordinates are expressed in meters.
[in]yb: Vector that contains the coordinates along y-axis (vertical) of matched points in image b. These coordinates are expressed in meters.
[in]xa: Vector that contains the coordinates along x-axis (horizontal) of matched points in image a. These coordinates are expressed in meters.
[in]ya: Vector that contains the coordinates along y-axis (vertical) of matched points in image a. These coordinates are expressed in meters.
[out]aHb: Estimated homography that relies the transformation from image a to image b.
[in]normalization: When set to true, the coordinates of the points are normalized. The normalization carried out is the one preconized by Hartley.
Exceptions
vpMatrixException::rankDeficient: When the rank of the matrix that should be 8 is deficient.
Examples
homographyHartleyDLT2DObject.cpp, and tutorial-homography-from-points.cpp.

Definition at line 195 of file vpHomographyDLT.cpp.

References vpException::dimensionError, vpException::fatalError, vpMatrix::getCol(), vpMatrixException::rankDeficient, vpArray2D< Type >::resize(), vpMatrix::svd(), and vpHomography().

Referenced by ransac().

◆ eye()

void vpHomography::eye ( )

Set the homography as identity transformation by setting the diagonal to 1 and all other values to 0.

Examples
testDisplacement.cpp.

Definition at line 389 of file vpHomography.cpp.

Referenced by vpHomography().

◆ 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.

◆ 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().

◆ 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().

◆ HLM()

BEGIN_VISP_NAMESPACE void vpHomography::HLM ( const std::vector< double > & xb,
const std::vector< double > & yb,
const std::vector< double > & xa,
const std::vector< double > & ya,
bool isplanar,
vpHomography & aHb )
static

From couples of matched points $^a{\bf p}=(x_a,y_a,1)$ in image a and $^b{\bf p}=(x_b,y_b,1)$ in image b with homogeneous coordinates, computes the homography matrix by resolving $^a{\bf p} = ^a{\bf H}_b\;
^b{\bf p}$ using Ezio Malis linear method (HLM) [29].

This method can consider points that are planar or non planar. The algorithm for planar scene implemented in this file is described in Ezio Malis PhD thesis [30].

Parameters
[in]xb: Vector that contains the coordinates along x-axis (horizontal) of matched points in image b. These coordinates are expressed in meters.
[in]yb: Vector that contains the coordinates along y-axis (vertical) of matched points in image b. These coordinates are expressed in meters.
[in]xa: Vector that contains the coordinates along x-axis (horizontal) of matched points in image a. These coordinates are expressed in meters.
[in]ya: Vector that contains the coordinates along y-axis (vertical) of matched points in image a. These coordinates are expressed in meters.
[in]isplanar: If true the points are assumed to be in a plane, otherwise there are assumed to be non planar.
[out]aHb: Estimated homography that relies the transformation from image a to image b.

If the boolean isplanar is true the points are assumed to be in a plane otherwise there are assumed to be non planar.

See also
DLT() when the scene is planar.
Examples
homographyHLM2DObject.cpp, homographyHLM3DObject.cpp, and tutorial-homography-from-points.cpp.

Definition at line 605 of file vpHomographyMalis.cpp.

References vpException::dimensionError, vpException::fatalError, and vpHomography().

Referenced by vpPose::poseFromRectangle().

◆ homography2collineation()

vpHomography vpHomography::homography2collineation ( const vpCameraParameters & cam) const

Transform an homography from calibrated domain to pixel space.

Given homography $\bf H$ in the Euclidean space or in the calibrated domain, compute the homography $\bf G$ corresponding to the collineation matrix in the pixel space using:

\‍[ {\bf G} = {\bf K} {\bf H} {\bf K}^{-1} \‍]

Parameters
[in]cam: Camera parameters used to fill ${\bf K}$ matrix such as

\‍[{\bf K} =
\left[ \begin{array}{ccc}
p_x & 0   & u_0  \\
0   & p_y & v_0 \\
0   & 0   & 1
\end{array}\right]
\‍]

Returns
The corresponding collineation matrix $\bf G$ in the pixel space.
See also
collineation2homography()

Definition at line 647 of file vpHomography.cpp.

References vpHomography().

Referenced by project().

◆ insert()

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.

◆ inverse() [1/2]

vpHomography vpHomography::inverse ( double sv_threshold = 1e-16,
unsigned int * rank = nullptr ) const

Return inverted homography.

Parameters
[in]sv_threshold: Threshold used to test the singular values. If a singular value is lower than this threshold we consider that the homography is not full rank.
[out]rank: Rank of the homography that should be 3.
Returns
Inverted homography $\bf H^{-1}$.

Definition at line 130 of file vpHomography.cpp.

References vpArray2D< Type >::getCols(), vpArray2D< Type >::getRows(), vpMatrix::pseudoInverse(), and vpHomography().

Referenced by inverse().

◆ inverse() [2/2]

void vpHomography::inverse ( vpHomography & bHa) const

Invert the homography.

Parameters
[in,out]bHa: $\bf H^{-1}$ with H = *this.

Definition at line 150 of file vpHomography.cpp.

References inverse(), and vpHomography().

◆ isFinite()

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

Definition at line 1188 of file vpArray2D.h.

◆ load() [1/2]

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/2]

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

Read an homography in a file, verify if it is really an homogeneous matrix.

Parameters
[in]f: the file. This file has to be written using save().
See also
save()

Definition at line 293 of file vpHomography.cpp.

References vpException::ioError.

◆ loadYAML()

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

◆ 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/4]

vpHomography vpHomography::operator* ( const double & v) const

Multiply an homography by a scalar.

Parameters
v: Value of the scalar.
double v = 1.1;
// Initialize aHb
vpHomography H = aHb * v;

Definition at line 197 of file vpHomography.cpp.

References vpArray2D< Type >::data, vpArray2D< double >::data, and vpHomography().

◆ operator*() [2/4]

vpColVector vpHomography::operator* ( const vpColVector & b) const

Operation a = aHb * b.

Parameters
b: 3 dimension vector.

Definition at line 178 of file vpHomography.cpp.

References vpException::dimensionError, and vpArray2D< Type >::size().

◆ operator*() [3/4]

vpHomography vpHomography::operator* ( const vpHomography & H) const

Multiplication by an homography.

Parameters
H: Homography to multiply with.
vpHomography aHb, bHc;
// Initialize aHb and bHc homographies
vpHomography aHc = aHb * bHc;

Definition at line 162 of file vpHomography.cpp.

References vpHomography().

◆ operator*() [4/4]

vpPoint vpHomography::operator* ( const vpPoint & b_P) const

From the coordinates of the point in image plane b and the homography between image a and b computes the coordinates of the point in image plane a.

Parameters
b_P: 2D coordinates of the point in the image plane b.
Returns
A point with 2D coordinates in the image plane a.

Definition at line 209 of file vpHomography.cpp.

References vpPoint::get_w(), vpPoint::get_x(), vpPoint::get_y(), vpPoint::set_w(), vpPoint::set_x(), and vpPoint::set_y().

◆ operator/()

vpHomography vpHomography::operator/ ( const double & v) const

Divide an homography by a scalar.

Parameters
v: Value of the scalar.
// Initialize aHb
vpHomography H = aHb / aHb[2][2];

Definition at line 230 of file vpHomography.cpp.

References vpArray2D< Type >::data, vpArray2D< double >::data, vpException::divideByZeroError, and vpHomography().

◆ operator/=()

vpHomography & vpHomography::operator/= ( double v)

Divide all the element of the homography matrix by v : Hij = Hij / v

Definition at line 247 of file vpHomography.cpp.

References vpArray2D< double >::data, vpException::divideByZeroError, and vpHomography().

◆ operator=() [1/2]

vpHomography & vpHomography::operator= ( const vpHomography & H)

Copy operator. Allow operation such as aHb = H

Parameters
H: Homography matrix to be copied.

Definition at line 263 of file vpHomography.cpp.

References vpHomography().

◆ operator=() [2/2]

vpHomography & vpHomography::operator= ( const vpMatrix & H)

Copy operator. Allow operation such as aHb = H

Parameters
H: Matrix to be copied.

Definition at line 277 of file vpHomography.cpp.

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

◆ 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.

◆ project() [1/2]

vpImagePoint vpHomography::project ( const vpCameraParameters & cam,
const vpHomography & bHa,
const vpImagePoint & iPa )
static

Given iPa a pixel with coordinates $(u_a,v_a)$ in image a, and the homography bHa in the Euclidean space or calibrated domain that links image a and b, computes the coordinates of the pixel $(u_b,v_b)$ in the image b using the camera parameters matrix $\bf K$.

Compute $^b{\bf p} = {\bf K} \; {^b}{\bf H}_a \; {\bf K}^{-1} {^a}{\bf
p}$ with $^a{\bf p}=(u_a,v_a,1)$ and $^b{\bf p}=(u_b,v_b,1)$

Returns
The coordinates in pixel of the point with coordinates $(u_b,v_b)$.
Examples
tutorial-homography-from-points.cpp, and tutorial-matching-keypoint-homography.cpp.

Definition at line 404 of file vpHomography.cpp.

References vpImagePoint::get_u(), vpImagePoint::get_v(), homography2collineation(), and vpHomography().

◆ project() [2/2]

vpPoint vpHomography::project ( const vpHomography & bHa,
const vpPoint & Pa )
static

Given Pa a point with normalized coordinates $(x_a,y_a,1)$ in the image plane a, and the homography bHa in the Euclidean space that links image a and b, computes the normalized coordinates of the point $(x_b,y_b,1)$ in the image plane b.

Compute $^b{\bf p} = {^b}{\bf H}_a \; {^a}{\bf p}$ with $^a{\bf
p}=(x_a,y_a,1)$ and $^b{\bf p}=(x_b,y_b,1)$

Returns
The coordinates in meter of the point with coordinates $(x_b,y_b)$.

Definition at line 418 of file vpHomography.cpp.

References vpPoint::get_x(), vpPoint::get_y(), vpPoint::set_x(), vpPoint::set_y(), and vpHomography().

◆ projection()

vpImagePoint vpHomography::projection ( const vpImagePoint & ipb)

Project the current image point (in frame b) into the frame a using the homography aHb.

Parameters
ipb: Homography defining the relation between frame a and frame b.
Returns
The projected image point in the frame a.

Definition at line 578 of file vpHomography.cpp.

References vpImagePoint::get_u(), vpImagePoint::get_v(), vpImagePoint::set_u(), and vpImagePoint::set_v().

◆ ransac()

bool vpHomography::ransac ( const std::vector< double > & xb,
const std::vector< double > & yb,
const std::vector< double > & xa,
const std::vector< double > & ya,
vpHomography & aHb,
std::vector< bool > & inliers,
double & residual,
unsigned int nbInliersConsensus,
double threshold,
bool normalization = true )
static

From couples of matched points $^a{\bf p}=(x_a,y_a,1)$ in image a and $^b{\bf p}=(x_b,y_b,1)$ in image b with homogeneous coordinates, computes the homography matrix by resolving $^a{\bf p} = ^a{\bf H}_b\;
^b{\bf p}$ using Ransac algorithm.

Parameters
[in]xb: Vector that contains the coordinates along x-axis (horizontal) of matched points in image b. These coordinates are expressed in meters.
[in]yb: Vector that contains the coordinates along y-axis (vertical) of matched points in image b. These coordinates are expressed in meters.
[in]xa: Vector that contains the coordinates along x-axis (horizontal) of matched points in image a. These coordinates are expressed in meters.
[in]ya: Vector that contains the coordinates along y-axis (vertical) of matched points in image a. These coordinates are expressed in meters.
[out]aHb: Estimated homography that relies the transformation from image a to image b.
[out]inliers: Vector that indicates if a matched point is an inlier (true) or an outlier (false).
[out]residual: Global residual computed as $r = \sqrt{1/n \sum_{inliers} {\| {^a{\bf p} - {\hat{^a{\bf
H}_b}} {^b{\bf p}}} \|}^{2}}$ with $n$ the number of inliers.
[in]nbInliersConsensus: Minimal number of points requested to fit the estimated homography.
[in]threshold: Threshold for outlier removing. A point is considered as an outlier if the reprojection error $\| {^a{\bf p} - {\hat{^a{\bf H}_b}}
{^b{\bf p}}} \|$ is greater than this threshold.
[in]normalization: When set to true, the coordinates of the points are normalized. The normalization carried out is the one preconized by Hartley.
Returns
true if the homography could be computed, false otherwise.
Examples
homographyRansac2DObject.cpp, and tutorial-matching-keypoint-homography.cpp.

Definition at line 347 of file vpHomographyRansac.cpp.

References vpException::dimensionError, DLT(), vpException::fatalError, vpERROR_TRACE, and vpHomography().

◆ 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 vpHomography::resize ( unsigned int nrows,
unsigned int ncols,
bool flagNullify = true )
inline

This function is not applicable to an homography that is always a 3-by-3 matrix.

Exceptions
vpException::fatalErrorWhen this function is called.

Definition at line 415 of file vpHomography.h.

References vpException::fatalError.

◆ robust()

void vpHomography::robust ( const std::vector< double > & xb,
const std::vector< double > & yb,
const std::vector< double > & xa,
const std::vector< double > & ya,
vpHomography & aHb,
std::vector< bool > & inliers,
double & residual,
double weights_threshold = 0.4,
unsigned int niter = 4,
bool normalization = true )
static

From couples of matched points $^a{\bf p}=(x_a,y_a,1)$ in image a and $^b{\bf p}=(x_b,y_b,1)$ in image b with homogeneous coordinates, computes the homography matrix by resolving $^a{\bf p} = ^a{\bf H}_b\;
^b{\bf p}$ using a robust estimation scheme.

This method is to compare to DLT() except that here a robust estimator is used to reject couples of points that are considered as outliers.

At least 4 couples of points are needed.

Parameters
[in]xb: Vector that contains the coordinates along x-axis (horizontal) of matched points in image b. These coordinates are expressed in meters.
[in]yb: Vector that contains the coordinates along y-axis (vertical) of matched points in image b. These coordinates are expressed in meters.
[in]xa: Vector that contains the coordinates along x-axis (horizontal) of matched points in image a. These coordinates are expressed in meters.
[in]ya: Vector that contains the coordinates along y-axis (vertical) of matched points in image a. These coordinates are expressed in meters.
[out]aHb: Estimated homography that relies the transformation from image a to image b.
[out]inliers: Vector that indicates if a matched point is an inlier (true) or an outlier (false).
[out]residual: Global residual computed as $r = \sqrt{1/n \sum_{inliers} {\| {^a{\bf p} - {\hat{^a{\bf H}_b}} {^b{\bf p}}} \|}^{2}}$ with $n$ the number of inliers.
[in]weights_threshold: Threshold applied on the weights updated during the robust estimation and used to consider if a point is an outlier or an inlier. Values should be in [0:1]. A couple of matched points that have a weight lower than this threshold is considered as an outlier. A value equal to zero indicates that all the points are inliers.
[in]niter: Number of iterations of the estimation process.
[in]normalization: When set to true, the coordinates of the points are normalized. The normalization carried out is the one preconized by Hartley.
See also
DLT(), ransac()
Examples
tutorial-matching-keypoint-homography.cpp.

Definition at line 434 of file vpHomography.cpp.

References vpArray2D< Type >::data, vpException::dimensionError, vpException::fatalError, vpMatrix::pseudoInverse(), vpRobust::TUKEY, and vpHomography().

◆ save() [1/2]

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/2]

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

Save an homography in a file. The load() function allows then to read and set the homography from this file.

See also
load()

Definition at line 152 of file vpHomography.cpp.

References vpException::ioError.

◆ 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.

◆ 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.

◆ operator==() [1/2]

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

◆ operator==() [2/2]

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

◆ 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.

◆ 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().