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 <QPair>
00025 #include <qvmath.h>
00026 #include <qvdta.h>
00027 #include <QVMatrix>
00028
00032
00035
00047 QVMatrix ComputeHomography(const QList<QPointF> &sourcePoints, const QList<QPointF> &destPoints);
00048
00058 QVMatrix ComputeProjectiveHomography(const QList< QPair<QPointF, QPointF> > &matchings);
00059
00064 QVMatrix ComputeEuclideanHomography(const QPair<QPointF, QPointF> &firstMatching, const QPair<QPointF, QPointF> &secondMatching);
00065
00070 QVMatrix ComputeEuclideanHomography(const QList< QPair<QPointF, QPointF> > &matchings);
00071
00076 QPointF ApplyHomography(const QVMatrix &homography, const QPointF &point);
00077
00082 QList<QPointF> ApplyHomography(const QVMatrix &homography, const QList<QPointF> &sourcePoints);
00083
00105 double HomographyTestError(const QVMatrix &homography);
00106
00107
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00128 void GetExtrinsicCameraMatrixFromHomography(const QVMatrix &K, const QVMatrix &H, QVMatrix &M4x4);
00129
00134 void GetDirectIntrinsicCameraMatrixFromHomography(const QVMatrix &H, QVMatrix &K);
00135
00140 void GetIntrinsicCameraMatrixFromHomography(const QVMatrix &H, QVMatrix &K,
00141 double focal = 3, const double maxFocal = 50, const int maxIterations = 100, const double maxError = 0.00001);
00142
00143 #endif