4 #include "QtXml/QDomDocument" 5 #include <QtXml/QDomElement> 6 #include <QtXml/QDomText> 7 #include <QSharedPointer> 10 #include "world_def.h" 12 #define SM_CALIB_MATRIX(model) (model->p_matrix) 13 #define SM_HOMOGRAPHY(model) (model->h_matrix) 15 #define SM_CAMERA_X_FOC_POINT(sm) ((sm)->camera_focal_point->x) 16 #define SM_CAMERA_Y_FOC_POINT(sm) ((sm)->camera_focal_point->y) 17 #define SM_CAMERA_Z_FOC_POINT(sm) ((sm)->camera_focal_point->z) 19 #define SM_CAMERA_X2D_FOC_POINT(sm) ((sm)->camera_focal_point2D->x) 20 #define SM_CAMERA_Y2D_FOC_POINT(sm) ((sm)->camera_focal_point2D->y) 30 MiddleCenter = 0x0000,
49 typedef enum zoneType zoneType;
53 QSharedPointer<point3D<double> > camera_focal_point;
54 QSharedPointer<point2D<double> > camera_focal_point2D;
55 perspective_matrix p_matrix;
56 homography_matrix h_matrix;
57 QTransform h_trans, h_trans_i;
63 std::vector< QSharedPointer<world::ContextObject> > contextObjects;
65 std::vector< QSharedPointer<world::AOI> > AOIs;
66 std::vector< QSharedPointer<world::Area> > Areas;
67 std::vector< QSharedPointer<world::Zone> > Zones;
68 std::vector< QSharedPointer<world::Wall> > walls;
69 std::vector< QSharedPointer<world::Wall2D> > wall2Ds;
72 std::vector< QSharedPointer<world::ZoneH> > ZonesH;
74 std::vector< QSharedPointer<world::Zone2D> > Zones2D;
76 QDomDocument *xmlScene;
78 double m_OneMeterRepresentation;
79 double m_MaximalObjectSpeed;
84 bool readScene(QString fileName);
85 bool readParameters(QString fileName);
86 bool readObjectModels(QString fileName);
88 static position setPosition(std::string pos);
89 static void getXY(position pos,
double &X,
double &Y,
Blob b);
95 static int worldToImgCoords(perspective_matrix persp_mat,
96 double x,
double y,
double z,
97 double *X,
double *Y);
103 static int homographyToImgCoords(homography_matrix H,
104 double X2,
double Y2,
105 double *X,
double *Y);
113 static int imgToWorldCoordsGivenHeight(perspective_matrix persp_mat,
114 double X,
double Y,
double z,
115 double *x,
double *y);
121 static int imgToHomographyCoords(homography_matrix H,
123 double *X2,
double *Y2);
126 bool computeFocalPoint(perspective_matrix pp,
int img_width,
int img_height,
127 double *camx,
double *camy,
double *camz);
129 double getLimitHeightForProjectionLine(
double x,
double y);
130 double getLowestImageIntersectingHeight(
int W,
int H,
double x,
double y);
135 #endif // CALIBRATION_H Definition: calibration.h:51
Definition: calibration.h:26
Definition: calibration.h:23