![]() |
Visual Servoing Platform
version 3.6.1 under development (2023-10-03)
|
#include <visp3/vision/vpHomography.h>
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) | |
virtual | ~vpHomography () |
void | buildFrom (const vpRotationMatrix &aRb, const vpTranslationVector &atb, const vpPlane &bP) |
void | buildFrom (const vpThetaUVector &tu, const vpTranslationVector &atb, const vpPlane &bP) |
void | buildFrom (const vpPoseVector &arb, const vpPlane &bP) |
void | buildFrom (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=NULL) 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 |
vpHomography & | operator/= (double v) |
vpHomography & | operator= (const vpHomography &H) |
vpHomography & | operator= (const vpMatrix &H) |
vpImagePoint | projection (const vpImagePoint &ipb) |
void | resize (unsigned int nrows, unsigned int ncols, bool flagNullify=true) |
void | save (std::ofstream &f) const |
void | setIdentity () |
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 |
bool | operator!= (const vpArray2D< double > &A) const |
double * | operator[] (unsigned int i) |
double * | operator[] (unsigned int i) const |
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) |
Public Attributes | |
double * | data |
Protected Attributes | |
unsigned int | rowNum |
unsigned int | colNum |
double ** | rowPtrs |
unsigned int | dsize |
Related Functions | |
(Note that these are not member functions.) | |
enum | vpGEMMmethod |
bool | operator== (const vpArray2D< double > &A) const |
bool | operator== (const vpArray2D< float > &A) const |
bool | operator!= (const vpArray2D< double > &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) |
Inherited I/O from vpArray2D with Static Public Member Functions | |
vpArray2D< double > | insert (const vpArray2D< double > &A, const vpArray2D< double > &B, unsigned int r, unsigned int c) |
static bool | load (const std::string &filename, vpArray2D< double > &A, bool binary=false, char *header=NULL) |
static bool | loadYAML (const std::string &filename, vpArray2D< double > &A, char *header=NULL) |
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 void | conv2 (const vpArray2D< double > &M, const vpArray2D< double > &kernel, vpArray2D< double > &res, const std::string &mode) |
static void | insert (const vpArray2D< double > &A, const vpArray2D< double > &B, vpArray2D< double > &C, unsigned int r, unsigned int c) |
Implementation of an homography and operations on homographies.
This class aims to compute the homography wrt. two images [34].
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 [28]. 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
with
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.
Definition at line 167 of file vpHomography.h.
vpHomography::vpHomography | ( | ) |
Initialize an homography as identity.
Definition at line 51 of file vpHomography.cpp.
References eye().
vpHomography::vpHomography | ( | const vpHomography & | H | ) |
Initialize an homography from another homography.
Definition at line 53 of file vpHomography.cpp.
vpHomography::vpHomography | ( | const vpHomogeneousMatrix & | aMb, |
const vpPlane & | bP | ||
) |
Construction from translation and rotation and a plane.
Definition at line 55 of file vpHomography.cpp.
References buildFrom().
vpHomography::vpHomography | ( | const vpRotationMatrix & | aRb, |
const vpTranslationVector & | atb, | ||
const vpPlane & | bP | ||
) |
Construction from translation and rotation and a plane.
Definition at line 66 of file vpHomography.cpp.
References buildFrom().
vpHomography::vpHomography | ( | const vpThetaUVector & | tu, |
const vpTranslationVector & | atb, | ||
const vpPlane & | bP | ||
) |
Construction from translation and rotation and a plane.
Definition at line 60 of file vpHomography.cpp.
References buildFrom().
vpHomography::vpHomography | ( | const vpPoseVector & | arb, |
const vpPlane & | bP | ||
) |
Construction from translation and rotation and a plane.
Definition at line 72 of file vpHomography.cpp.
References buildFrom().
|
inlinevirtual |
Destructor.
Definition at line 232 of file vpHomography.h.
void vpHomography::buildFrom | ( | const vpHomogeneousMatrix & | aMb, |
const vpPlane & | bP | ||
) |
Construction from homogeneous matrix and a plane.
Definition at line 77 of file vpHomography.cpp.
void vpHomography::buildFrom | ( | const vpPoseVector & | arb, |
const vpPlane & | bP | ||
) |
Construction from translation and rotation and a plane.
Definition at line 100 of file vpHomography.cpp.
References vpHomogeneousMatrix::buildFrom().
void vpHomography::buildFrom | ( | const vpRotationMatrix & | aRb, |
const vpTranslationVector & | atb, | ||
const vpPlane & | bP | ||
) |
Construction from translation and rotation and a plane.
Definition at line 92 of file vpHomography.cpp.
Referenced by vpHomography().
void vpHomography::buildFrom | ( | const vpThetaUVector & | tu, |
const vpTranslationVector & | atb, | ||
const vpPlane & | bP | ||
) |
Construction from translation and rotation and a plane.
Definition at line 84 of file vpHomography.cpp.
vpHomography vpHomography::collineation2homography | ( | const vpCameraParameters & | cam | ) | const |
Transform an homography from pixel space to calibrated domain.
Given homography corresponding to the collineation matrix in the pixel space, compute the homography matrix
in the Euclidean space or calibrated domain using:
[in] | cam | : Camera parameters used to fill ![]()
|
Definition at line 561 of file vpHomography.cpp.
References vpCameraParameters::get_px(), vpCameraParameters::get_px_inverse(), vpCameraParameters::get_py(), vpCameraParameters::get_py_inverse(), vpCameraParameters::get_u0(), and vpCameraParameters::get_v0().
void vpHomography::computeDisplacement | ( | const vpColVector & | nd, |
vpRotationMatrix & | aRb, | ||
vpTranslationVector & | atb, | ||
vpColVector & | n | ||
) |
Compute the camera displacement between two images from the homography which is here an implicit parameter (*this).
Camera displacement between and
is represented as a rotation matrix
and a translation vector
from which an homogeneous matrix can be build (vpHomogeneousMatrix).
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 ![]() |
atb | : Translation vector as an output ![]() |
n | : Normal vector to the plane as an output. |
Definition at line 56 of file vpHomographyExtract.cpp.
References computeDisplacement().
void vpHomography::computeDisplacement | ( | vpRotationMatrix & | aRb, |
vpTranslationVector & | atb, | ||
vpColVector & | n | ||
) |
Compute the camera displacement between two images from the homography which is here an implicit parameter (*this).
aRb | : Rotation matrix as an output ![]() |
atb | : Translation vector as an output ![]() |
n | : Normal vector to the plane as an output. |
Definition at line 45 of file vpHomographyExtract.cpp.
Referenced by computeDisplacement().
|
staticinherited |
Perform a 2D convolution similar to Matlab conv2 function: .
M | : First matrix. |
kernel | : Second matrix. |
mode | : Convolution mode: "full" (default), "same", "valid". |
Definition at line 956 of file vpArray2D.h.
|
staticinherited |
Perform a 2D convolution similar to Matlab conv2 function: .
M | : First array. |
kernel | : Second array. |
res | : Result. |
mode | : Convolution mode: "full" (default), "same", "valid". |
Definition at line 970 of file vpArray2D.h.
vpMatrix vpHomography::convert | ( | ) | const |
Converts an homography to a matrix.
Definition at line 551 of file vpHomography.cpp.
Referenced by vpMbtDistanceKltPoints::computeHomography().
double vpHomography::det | ( | ) | const |
Return homography determinant.
Definition at line 340 of file vpHomography.cpp.
|
static |
From couples of matched points in image a and
in image b with homogeneous coordinates, computes the homography matrix by resolving
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 : where
is the vector with the terms of
and
depends on the points coordinates.
For each point, in homogeneous coordinates we have:
which is equivalent to:
If we note the
line of
, we can write:
Setting , the cross product can be rewritten by:
leading to an homogeneous system to be solved: with
.
It can be solved using an SVD decomposition:
h is the column of V associated with the smallest singular value of A
xb,yb | : Coordinates vector of matched points in image b. These coordinates are expressed in meters. |
xa,ya | : Coordinates vector of matched points in image a. These coordinates are expressed in meters. |
aHb | : Estimated homography that relies the transformation from image a to image b. |
normalization | : When set to true, the coordinates of the points are normalized. The normalization carried out is the one preconized by Hartley. |
vpMatrixException::rankDeficient | : When the rank of the matrix that should be 8 is deficient. |
Definition at line 181 of file vpHomographyDLT.cpp.
References vpException::dimensionError, vpException::fatalError, vpMatrix::getCol(), vpMatrixException::rankDeficient, vpArray2D< Type >::resize(), vpMatrix::svd(), vpERROR_TRACE, and vpTRACE.
Referenced by ransac().
void vpHomography::eye | ( | ) |
Set the homography as identity transformation by setting the diagonal to 1 and all other values to 0.
Definition at line 347 of file vpHomography.cpp.
Referenced by setIdentity(), and vpHomography().
|
inlineinherited |
Return the number of columns of the 2D array.
Definition at line 280 of file vpArray2D.h.
|
inherited |
Return the array max value.
Definition at line 282 of file vpArray2D.h.
|
inherited |
Return the array min value.
Definition at line 284 of file vpArray2D.h.
|
inlineinherited |
Return the number of rows of the 2D array.
Definition at line 290 of file vpArray2D.h.
Compute the Hadamard product (element wise matrix multiplication).
m | : Second matrix; |
Definition at line 554 of file vpArray2D.h.
|
static |
From couples of matched points in image a and
in image b with homogeneous coordinates, computes the homography matrix by resolving
using Ezio Malis linear method (HLM) [27].
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 [28].
xb,yb | : Coordinates vector of matched points in image b. These coordinates are expressed in meters. |
xa,ya | : Coordinates vector of matched points in image a. These coordinates are expressed in meters. |
isplanar | : If true the points are assumed to be in a plane, otherwise there are assumed to be non planar. |
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.
Definition at line 595 of file vpHomographyMalis.cpp.
References vpException::dimensionError, and vpException::fatalError.
Referenced by vpPose::poseFromRectangle().
vpHomography vpHomography::homography2collineation | ( | const vpCameraParameters & | cam | ) | const |
Transform an homography from calibrated domain to pixel space.
Given homography in the Euclidean space or in the calibrated domain, compute the homography
corresponding to the collineation matrix in the pixel space using:
[in] | cam | : Camera parameters used to fill ![]()
|
Definition at line 599 of file vpHomography.cpp.
References vpCameraParameters::get_px(), vpCameraParameters::get_px_inverse(), vpCameraParameters::get_py(), vpCameraParameters::get_py_inverse(), vpCameraParameters::get_u0(), and vpCameraParameters::get_v0().
Referenced by project().
|
inherited |
Insert array B in array A at the given position.
A | : Main array. |
B | : Array to insert. |
r | : Index of the row where to add the array. |
c | : Index of the column where to add the array. |
Definition at line 984 of file vpArray2D.h.
|
inlineinherited |
Insert array A at the given position in the current array.
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 417 of file vpArray2D.h.
vpHomography vpHomography::inverse | ( | double | sv_threshold = 1e-16 , |
unsigned int * | rank = NULL |
||
) | const |
Return inverted homography.
[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. |
Definition at line 123 of file vpHomography.cpp.
References vpMatrix::pseudoInverse().
Referenced by inverse().
void vpHomography::inverse | ( | vpHomography & | bHa | ) | const |
Invert the homography.
bHa | : ![]() |
Definition at line 141 of file vpHomography.cpp.
References inverse().
|
inlinestaticinherited |
Load a matrix from a file.
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. |
Definition at line 582 of file vpArray2D.h.
void vpHomography::load | ( | std::ifstream & | f | ) |
Read an homography in a file, verify if it is really an homogeneous matrix.
f | : the file. This file has to be written using save(). |
Definition at line 267 of file vpHomography.cpp.
References vpException::ioError.
|
inlinestaticinherited |
Load an array from a YAML-formatted file.
filename | : absolute file name. |
A | : array to be loaded from the file. |
header | : header of the file is loaded in this parameter. |
Definition at line 696 of file vpArray2D.h.
|
inherited |
Not equal to comparison operator of a 2D array.
Definition at line 442 of file vpArray2D.h.
vpHomography vpHomography::operator* | ( | const double & | v | ) | const |
Multiply an homography by a scalar.
v | : Value of the scalar. |
Definition at line 183 of file vpHomography.cpp.
References vpArray2D< double >::data, and vpArray2D< Type >::data.
vpColVector vpHomography::operator* | ( | const vpColVector & | b | ) | const |
Operation a = aHb * b.
b | : 3 dimension vector. |
Definition at line 167 of file vpHomography.cpp.
References vpException::dimensionError, and vpArray2D< Type >::size().
vpHomography vpHomography::operator* | ( | const vpHomography & | H | ) | const |
Multiplication by an homography.
H | : Homography to multiply with. |
Definition at line 152 of file vpHomography.cpp.
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.
b_P | : 2D coordinates of the point in the image plane b. |
Definition at line 194 of file vpHomography.cpp.
References vpPoint::get_w(), vpPoint::get_x(), vpPoint::get_y(), vpPoint::set_w(), vpPoint::set_x(), and vpPoint::set_y().
vpHomography vpHomography::operator/ | ( | const double & | v | ) | const |
Divide an homography by a scalar.
v | : Value of the scalar. |
Definition at line 215 of file vpHomography.cpp.
References vpArray2D< double >::data, vpArray2D< Type >::data, and vpException::divideByZeroError.
vpHomography & vpHomography::operator/= | ( | double | v | ) |
Divide all the element of the homography matrix by v : Hij = Hij / v
Definition at line 230 of file vpHomography.cpp.
References vpArray2D< double >::data, and vpException::divideByZeroError.
vpHomography & vpHomography::operator= | ( | const vpHomography & | H | ) |
Copy operator. Allow operation such as aHb = H
H | : Homography matrix to be copied. |
Definition at line 244 of file vpHomography.cpp.
vpHomography & vpHomography::operator= | ( | const vpMatrix & | H | ) |
Copy operator. Allow operation such as aHb = H
H | : Matrix to be copied. |
Definition at line 255 of file vpHomography.cpp.
References vpException::dimensionError, vpArray2D< Type >::getCols(), and vpArray2D< Type >::getRows().
Equal to comparison operator of a 2D array.
Definition at line 438 of file vpArray2D.h.
|
inlineinherited |
Set element using A[i][j] = x.
Definition at line 520 of file vpArray2D.h.
|
inlineinherited |
Get element using x = A[i][j].
Definition at line 522 of file vpArray2D.h.
|
static |
Given iPa
a pixel with coordinates 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 in the image b using the camera parameters matrix
.
Compute with
and
Definition at line 367 of file vpHomography.cpp.
References vpImagePoint::get_u(), vpImagePoint::get_v(), and homography2collineation().
|
static |
Given Pa
a point with normalized coordinates 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 in the image plane b.
Compute with
and
Definition at line 381 of file vpHomography.cpp.
References vpPoint::get_x(), vpPoint::get_y(), vpPoint::set_x(), and vpPoint::set_y().
vpImagePoint vpHomography::projection | ( | const vpImagePoint & | ipb | ) |
Project the current image point (in frame b) into the frame a using the homography aHb.
ipb | : Homography defining the relation between frame a and frame b. |
Definition at line 533 of file vpHomography.cpp.
References vpImagePoint::get_u(), vpImagePoint::get_v(), vpImagePoint::set_u(), and vpImagePoint::set_v().
|
static |
From couples of matched points in image a and
in image b with homogeneous coordinates, computes the homography matrix by resolving
using Ransac algorithm.
xb,yb | : Coordinates vector of matched points in image b. These coordinates are expressed in meters. |
xa,ya | : Coordinates vector of matched points in image a. These coordinates are expressed in meters. |
aHb | : Estimated homography that relies the transformation from image a to image b. |
inliers | : Vector that indicates if a matched point is an inlier (true) or an outlier (false). |
residual | : Global residual computed as ![]() ![]() |
nbInliersConsensus | : Minimal number of points requested to fit the estimated homography. |
threshold | : Threshold for outlier removing. A point is considered as an outlier if the reprojection error ![]() |
normalization | : When set to true, the coordinates of the points are normalized. The normalization carried out is the one preconized by Hartley. |
Definition at line 284 of file vpHomographyRansac.cpp.
References vpException::dimensionError, DLT(), vpException::fatalError, and vpERROR_TRACE.
|
inlineinherited |
Definition at line 383 of file vpArray2D.h.
|
inline |
This function is not applicable to an homography that is always a 3-by-3 matrix.
vpException::fatalError | When this function is called. |
Definition at line 450 of file vpHomography.h.
References vpException::fatalError.
Referenced by robust().
|
inlineinherited |
Set the size of the array and initialize all the values to zero.
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. |
Definition at line 305 of file vpArray2D.h.
|
static |
From couples of matched points in image a and
in image b with homogeneous coordinates, computes the homography matrix by resolving
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.
xb,yb | : Coordinates vector of matched points in image b. These coordinates are expressed in meters. |
xa,ya | : Coordinates vector of matched points in image a. These coordinates are expressed in meters. |
aHb | : Estimated homography that relies the transformation from image a to image b. |
inliers | : Vector that indicates if a matched point is an inlier (true) or an outlier (false). |
residual | : Global residual computed as ![]() ![]() |
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. |
niter | : Number of iterations of the estimation process. |
normalization | : When set to true, the coordinates of the points are normalized. The normalization carried out is the one preconized by Hartley. |
Definition at line 397 of file vpHomography.cpp.
References vpArray2D< Type >::data, vpException::dimensionError, vpException::fatalError, vpRobust::MEstimator(), vpMatrix::pseudoInverse(), resize(), and vpRobust::TUKEY.
|
inlinestaticinherited |
Save a matrix to a file.
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. |
Warning : If you save the matrix as in a text file the precision is less than if you save it in a binary file.
Definition at line 784 of file vpArray2D.h.
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.
Definition at line 143 of file vpHomography.cpp.
References vpException::ioError.
|
inlinestaticinherited |
Save an array in a YAML-formatted file.
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. |
Here is an example of outputs.
Content of matrix.yml:
Content of matrixIndent.yml:
Definition at line 877 of file vpArray2D.h.
void vpHomography::setIdentity | ( | ) |
Set the homography as identity transformation.
Definition at line 364 of file vpHomography.cpp.
References eye().
|
inlineinherited |
Return the number of elements of the 2D array.
Definition at line 292 of file vpArray2D.h.
Compute the transpose of the array.
Definition at line 561 of file vpArray2D.h.
|
related |
Insert array B in array A at the given position.
A | : Main array. |
B | : Array to insert. |
C | : Result array. |
r | : Index of the row where to insert array B. |
c | : Index of the column where to insert array B. |
Definition at line 999 of file vpArray2D.h.
|
related |
Definition at line 1227 of file vpArray2D.h.
|
related |
Definition at line 1191 of file vpArray2D.h.
|
related |
Definition at line 1209 of file vpArray2D.h.
|
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 :
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:
vpException::incorrectMatrixSizeError | if the sizes of the matrices do not allow the operations. |
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. |
|
related |
Enumeration of the operations applied on matrices in vpGEMM() function.
Operations are :
|
protectedinherited |
Number of columns in the array.
Definition at line 136 of file vpArray2D.h.
|
inherited |
Address of the first element of the data array.
Definition at line 144 of file vpArray2D.h.
|
protectedinherited |
Current array size (rowNum * colNum)
Definition at line 140 of file vpArray2D.h.
|
protectedinherited |
Number of rows in the array.
Definition at line 134 of file vpArray2D.h.
|
protectedinherited |
Address of the first element of each rows.
Definition at line 138 of file vpArray2D.h.