00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef PROJECTIVE_H
00022 #define PROJECTIVE_H
00023
00024 #include <qvmath/qvmatrix.h>
00025 #include <qvmath/qvmath.h>
00026 #include <qvdta/qvdta.h>
00027 #include <QPair>
00028
00029
00033
00036
00048 QVMatrix ComputeHomography(const QList<QPointF> &sourcePoints, const QList<QPointF> &destPoints);
00049
00059 QVMatrix ComputeProjectiveHomography(const QList< QPair<QPointF, QPointF> > &matchings);
00060
00065 QVMatrix ComputeEuclideanHomography(const QPair<QPointF, QPointF> &firstMatching, const QPair<QPointF, QPointF> &secondMatching);
00066
00071 QVMatrix ComputeEuclideanHomography(const QList< QPair<QPointF, QPointF> > &matchings);
00072
00077 QPointF ApplyHomography(const QVMatrix &homography, const QPointF &point);
00078
00083 QList<QPointF> ApplyHomography(const QVMatrix &homography, const QList<QPointF> &sourcePoints);
00084
00106 double HomographyTestError(const QVMatrix &homography);
00107
00108
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00129 void GetExtrinsicCameraMatrixFromHomography(const QVMatrix &K, const QVMatrix &H, QVMatrix &M4x4);
00130
00135 void GetDirectIntrinsicCameraMatrixFromHomography(const QVMatrix &H, QVMatrix &K);
00136
00141 void GetIntrinsicCameraMatrixFromHomography(const QVMatrix &H, QVMatrix &K,
00142 double focal = 3, const double maxFocal = 50, const int maxIterations = 100, const double maxError = 0.00001);
00143
00144 #endif