![]() |
University of Murcia, Spain ![]() |
Projective GeometryTools related to Projective Geometry. |
Functions | |
QVMatrix | ComputeHomography (const QList< QPointF > &sourcePoints, const QList< QPointF > &destPoints) |
Obtains an homography from two lists of corresponding points.
This function returns the homography that maps the points from a source position to a destination position, according to a projective transormation. | |
QVMatrix | ComputeProjectiveHomography (const QList< QPair< QPointF, QPointF > > &matchings) |
Obtains an homography from two lists of corresponding points.
This function returns the homography that maps the points from a source position to a destination position, according to a projective transformation. | |
QVMatrix | ComputeEuclideanHomography (const QPair< QPointF, QPointF > &firstMatching, const QPair< QPointF, QPointF > &secondMatching) |
QVMatrix | ComputeEuclideanHomography (const QList< QPair< QPointF, QPointF > > &matchings) |
QPointF | ApplyHomography (const QVMatrix &homography, const QPointF &point) |
QList< QPointF > | ApplyHomography (const QVMatrix &homography, const QList< QPointF > &sourcePoints) |
double | HomographyTestError (const QVMatrix &homography) |
Function to test if a 3x3 matrix corresponds to an homography.
Every matrix which holds a perspective deformation from one plane to another should validate some constrains. The most important is that its two first columns should be perpendicular, and with a similar size, because for the matrix to correspond to an homography, they should be contained in a base of a rotated coordinate system. Given the following homography matrix:. | |
void | GetExtrinsicCameraMatrixFromHomography (const QVMatrix &K, const QVMatrix &H, QVMatrix &M4x4) |
void | GetDirectIntrinsicCameraMatrixFromHomography (const QVMatrix &H, QVMatrix &K) |
void | GetIntrinsicCameraMatrixFromHomography (const QVMatrix &H, QVMatrix &K, double focal=3, const double maxFocal=50, const int maxIterations=100, const double maxError=0.00001) |
Decompositions, etc...
QList<QPointF> ApplyHomography | ( | const QVMatrix & | homography, | |
const QList< QPointF > & | sourcePoints | |||
) |
QPointF ApplyHomography | ( | const QVMatrix & | homography, | |
const QPointF & | point | |||
) |
Definition at line 231 of file qvprojective.cpp.
Referenced by ApplyHomography().
QVMatrix ComputeEuclideanHomography | ( | const QList< QPair< QPointF, QPointF > > & | matchings | ) |
QVMatrix ComputeEuclideanHomography | ( | const QPair< QPointF, QPointF > & | firstMatching, | |
const QPair< QPointF, QPointF > & | secondMatching | |||
) |
QVMatrix ComputeHomography | ( | const QList< QPointF > & | sourcePoints, | |
const QList< QPointF > & | destPoints | |||
) |
Obtains an homography from two lists of corresponding points.
This function returns the homography that maps the points from a source position to a destination position, according to a projective transormation.
sourcePoints | list of source points. | |
destinationPoints | list of destination points. |
Definition at line 143 of file qvprojective.cpp.
QVMatrix ComputeProjectiveHomography | ( | const QList< QPair< QPointF, QPointF > > & | matchings | ) |
Obtains an homography from two lists of corresponding points.
This function returns the homography that maps the points from a source position to a destination position, according to a projective transformation.
matchings | list of matchings |
Definition at line 31 of file qvprojective.cpp.
Referenced by ComputeHomography().
double HomographyTestError | ( | const QVMatrix & | homography | ) |
Function to test if a 3x3 matrix corresponds to an homography.
Every matrix which holds a perspective deformation from one plane to another should validate some constrains. The most important is that its two first columns should be perpendicular, and with a similar size, because for the matrix to correspond to an homography, they should be contained in a base of a rotated coordinate system. Given the following homography matrix:.
The error value returned by this function for it will be:
That error is a measure of the difference of sizes between the norm of the two column vectors of the homography, corresponding to the two first columns of the rotation matrix, and their dot product. When both values are close to zero, the matrix corresponds to an homography, and it won't otherwise.
A good method to stablish that a matrix corresponds to an homography using this function, can be done testing the return value with a threshold of aproximately 0.3. If the return value of this function for a matrix is lower than this threshold, that matrix is likely to correspond to an homography, and is not likely to correspond otherwise.
homography | a possible homography matrix. |
Definition at line 250 of file qvprojective.cpp.