PARP Research Group University of Murcia, Spain


Projective Geometry
[Math extensions]

Functions related to Projective Geometry. More...

Functions

QVMatrix ComputeHomography (const QList< QPointF > &sourcePoints, const QList< QPointF > &destPoints)
 Obtains an homography from two lists of corresponding points.
QVMatrix ComputeProjectiveHomography (const QList< QPair< QPointF, QPointF > > &matchings)
 Obtains an homography from two lists of corresponding points.
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.
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)

Detailed Description

Functions related to Projective Geometry.

Projective Geometry models the principles of perspective, and provides important results for Computer Vision.


Function Documentation

QList<QPointF> ApplyHomography ( const QVMatrix homography,
const QList< QPointF > &  sourcePoints 
)

Todo:
write documentation for this function

Definition at line 242 of file qvprojective.cpp.

QPointF ApplyHomography ( const QVMatrix homography,
const QPointF &  point 
)

Todo:
write documentation for this function

Definition at line 231 of file qvprojective.cpp.

QVMatrix ComputeEuclideanHomography ( const QList< QPair< QPointF, QPointF > > &  matchings  ) 

Todo:
write documentation for this function

Definition at line 186 of file qvprojective.cpp.

QVMatrix ComputeEuclideanHomography ( const QPair< QPointF, QPointF > &  firstMatching,
const QPair< QPointF, QPointF > &  secondMatching 
)

Todo:
write documentation for this function

Definition at line 152 of file qvprojective.cpp.

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.

Deprecated:
Use ComputeProjectiveHomography instead
Parameters:
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.

Parameters:
matchings list of matchings

Definition at line 31 of file qvprojective.cpp.

void GetDirectIntrinsicCameraMatrixFromHomography ( const QVMatrix H,
QVMatrix K 
)

Todo:
write documentation for this function

Definition at line 322 of file qvprojective.cpp.

void GetExtrinsicCameraMatrixFromHomography ( const QVMatrix K,
const QVMatrix H,
QVMatrix M4x4 
)

Todo:
write documentation for this function

Definition at line 348 of file qvprojective.cpp.

void GetIntrinsicCameraMatrixFromHomography ( const QVMatrix H,
QVMatrix K,
double  focal = 3,
const double  maxFocal = 50,
const int  maxIterations = 100,
const double  maxError = 0.00001 
)

Todo:
write documentation for this function

Definition at line 292 of file qvprojective.cpp.

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:

$ H = \left[ R_1 R_2 -CR^t \right] $

The error value returned by this function for it will be:

$ error = \left| \frac{ \|R_1\| - \|R_2\| }{ \|R_1\| + \|R_2\| } \right| + \left| \frac{ R_1 \cdot R_2}{ \|R_1\| \|R_2\| } \right| $

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.

Parameters:
homography a possible homography matrix.
Returns:
a value close to 1 when the matrix doesn't corresponds to an homography, and close to 0 when it is close to be an homography.

Definition at line 250 of file qvprojective.cpp.




QVision framework. PARP research group, copyright 2007, 2008.