7 #include <QSharedPointer> 37 bool pointInside(
double x,
double y);
38 void buildPoly3DOnGround(std::vector< QSharedPointer<Area> > &areas);
39 bool blobInsideGround3D(
Blob *blob);
42 QSharedPointer < polygon3D<double> > poly3DOnGround;
43 QSharedPointer < polygon2D<double> > poly2DOnGround;
45 QSharedPointer < polygon2D<double> > outlineOnImg;
53 bool pointInZone(
double x,
double y);
57 QSharedPointer < polygon3D<double> > outline3D;
58 QSharedPointer < polygon2D<int> > outline;
74 typedef enum zone2DType zone2DType;
81 virtual bool pointInZone(
double x,
double y)=0;
82 virtual bool setParameters(QDomNode ¶ms, homography_matrix h_matrix)=0;
83 virtual bool draw(QPainter &p, QColor &color, QTransform &h_trans)=0;
84 virtual double distanceToCenter(
double x,
double y)=0;
97 bool pointInZone(
double x,
double y);
98 bool setParameters(QDomNode ¶ms, homography_matrix h_matrix);
99 bool draw(QPainter &p, QColor &color, QTransform &h_trans);
100 double distanceToCenter(
double x,
double y);
103 QSharedPointer < polygon2D<double> > outline2D;
105 QSharedPointer < polygon2D<int> > outline;
113 bool pointInZone(
double x,
double y);
114 bool setParameters(QDomNode ¶ms, homography_matrix h_matrix);
115 bool draw(QPainter &p, QColor &color, QTransform &h_trans);
116 double distanceToCenter(
double x,
double y);
128 virtual bool pointInZone(
double x,
double y) = 0;
129 virtual bool setParameters(QDomNode ¶ms)=0;
130 virtual bool draw(QPainter &p, QColor color)=0;
142 bool pointInZone(
double x,
double y);
143 bool setParameters(QDomNode ¶ms);
144 bool draw(QPainter &p, QColor color);
147 QSharedPointer < polygon2D<int> > outline;
155 bool pointInZone(
double x,
double y);
156 bool setParameters(QDomNode ¶ms);
157 bool draw(QPainter &p, QColor color);
169 bool pointInside(
double x,
double y);
170 bool zoneInside(QString name);
173 std::vector< QSharedPointer<Zone> > visibleParts;
181 void setWallAsLineEquation();
185 QSharedPointer< point3D<double> > startPoint;
186 QSharedPointer< point3D<double> > endPoint;
190 bool segmentIsFunction;
201 void setWallSegment(
double x1,
double y1,
double x2,
double y2,
int in_height);
205 int inWallSegmentInterval(
double coord,
int orientation,
double& val1,
double& val2);
208 static bool twoSegmentsIntersection(
WallSegment *wsegment1,
WallSegment *wsegment2,
double& x,
double& y);
214 bool inSegmentGivenIntersection(
double x,
double y);
248 bool get2DWallLine(
double h,
double *a,
double *b);
254 bool pointIsPertinent(
double h, perspective_matrix persp_mat,
double x2d,
double y2d);
257 bool pointInFloorIsPertinent(perspective_matrix persp_mat,
double x2d,
double y2d);
263 int discriminationType;
266 DetectionProblemType occPertinance;
267 QSharedPointer < polygon2D<double> > outlineOnImage;
269 double A[2],B[2],C[2];
279 int setObjectOutlineFromWallList();
280 int setObjectWallListFromOutline();
285 QSharedPointer< polygon3D<double> > outline;
288 std::vector< QSharedPointer<Wall> > wallList;
290 std::vector< QSharedPointer<Wall2D> > wall2DList;
292 QSharedPointer < polygon2D<double> > outline2DOnImage;
293 QSharedPointer < polygon2D<double> > poly2DOfObjectBase;
294 QSharedPointer < polygon2D<double> > poly2DOfObjectRoof;
295 QSharedPointer < polygon2D<double> > poly2DOfOutline;
307 QSharedPointer < point3D<double> > location;
308 QSharedPointer < point3D<double> > focalPoint;
309 QSharedPointer < point2D<double> > focalPoint2D;
314 #define AREA_NAME(ar) ((ar)->name) 315 #define AREA_NTH_PART(ar, n) ((ar)->visibleParts[n]) 317 #define AOI_NAME(aoi) ((aoi)->name) 318 #define AOI_ID(aoi) ((aoi)->id) 319 #define AOI_POLY3D_ON_GROUND(aoi) ((aoi)->poly3dOnGround) 320 #define AOI_POLY2D_ON_GROUND(aoi) ((aoi)->poly2dOnGround) 321 #define AOI_OUTLINE_ON_IMG(aoi) ((aoi)->outlineOnImg) 322 #define AOI_HEIGHT(aoi) ((aoi)->height) 324 #define ZONE_ID(zn) ((zn)->id) 325 #define ZONE_NAME(zn) ((zn)->name) 326 #define ZONE_OUTLINE(zn) ((zn)->outline) 327 #define ZONE_OUTLINE_2D(zn) ((zn)->outline2D) 328 #define ZONE_OUTLINE_3D(zn) ((zn)->outline3D) 330 #define WALL_ID(wl) ((wl)->id) 331 #define WALL_NAME(wl) ((wl)->name) 332 #define WALL_START_POINT(wl) ((wl)->startPoint) 333 #define WALL_START_POINT_X(wl) ((wl)->startPoint->x) 334 #define WALL_START_POINT_Y(wl) ((wl)->startPoint->y) 335 #define WALL_START_POINT_Z(wl) ((wl)->startPoint->z) 336 #define WALL_END_POINT(wl) ((wl)->endPoint) 337 #define WALL_END_POINT_X(wl) ((wl)->endPoint->x) 338 #define WALL_END_POINT_Y(wl) ((wl)->endPoint->y) 339 #define WALL_END_POINT_Z(wl) ((wl)->endPoint->z) 340 #define WALL_HEIGHT(wl) ((wl)->height) 341 #define WALL_IS_SOLID(wl) ((wl)->solid) 342 #define WALL_SEGMENT_IS_FUNCTION(wl) ((wl)->segmentIsFunction) 343 #define WALL_A(wl) ((wl)->a) 344 #define WALL_B(wl) ((wl)->b) 346 #define WALL2D_ID(wl) ((wl)->id) 347 #define WALL2D_NAME(wl) ((wl)->name) 348 #define WALL2D_VISIBLE(wl) ((wl)->visible) 349 #define WALL2D_DIS_TYPE(wl) ((wl)->discriminationType) 350 #define WALL2D_OCC_PERT(wl) ((wl)->occPertinance) 351 #define WALL2D_PARAM_A(wl) ((wl)->A) 352 #define WALL2D_PARAM_B(wl) ((wl)->B) 353 #define WALL2D_PARAM_C(wl) ((wl)->C) 354 #define WALL2D_PARAM_K(wl) ((wl)->K) 355 #define WALL2D_PARAM_A_i(wl,i) ((wl)->A[i]) 356 #define WALL2D_PARAM_B_i(wl,i) ((wl)->B[i]) 357 #define WALL2D_PARAM_C_i(wl,i) ((wl)->C[i]) 358 #define WALL2D_PARAM_K_i(wl,i) ((wl)->K[i]) 359 #define WALL2D_MAXH(wl) ((wl)->max_h) 360 #define WALL2D_OUTLINE_ON_IMAGE(wl) ((wl)->outlineOnImage) 361 #define WALL2D_SEGMENT(wl,i) (&((wl)->wsegments[i])) 362 #define WALL2D_SEGMENT_BASE3D(wl) (&((wl)->base3Dsegment)) 364 #define WSEGMENT_X1(ws) ((ws)->x1) 365 #define WSEGMENT_Y1(ws) ((ws)->y1) 366 #define WSEGMENT_X2(ws) ((ws)->x2) 367 #define WSEGMENT_Y2(ws) ((ws)->y2) 368 #define WSEGMENT_SLOPE(ws) ((ws)->slope) 369 #define WSEGMENT_INTERCEPT(ws) ((ws)->intercept) 370 #define WSEGMENT_IS_VERTICAL(ws) ((ws)->vertical) 371 #define WSEGMENT_IN_HEIGHT(ws) ((ws)->inHeight) 373 #define WOBJECT_ID(wo) ((wo)->id) 374 #define WOBJECT_NAME(wo) ((wo)->name) 375 #define WOBJECT_HEIGHT(wo) ((wo)->height) 376 #define WOBJECT_OUTLINE(wo) ((wo)->outline) 377 #define WOBJECT_WALLS_LIST(wo) (&(wo)->wallList) 378 #define WOBJECT_WALLS_2D_LIST(wo) (&(wo)->wall2DList) 379 #define WOBJECT_2D_OF_OUTLINE(wo) ((wo)->poly2DOfOutline) 380 #define WOBJECT_OUTLINE2D_ON_IMAGE(wo) ((wo)->outline2DOnImage) 381 #define WOBJECT_BASE2D_ON_IMAGE(wo) ((wo)->poly2DOfObjectBase) 382 #define WOBJECT_ROOF2D_ON_IMAGE(wo) ((wo)->poly2DOfObjectRoof) 383 #define WOBJECT_IS_HOLLOW(wo) ((wo)->hollow) 384 #define WOBJECT_NO_ROOF(wo) ((wo)->noRoof) 386 #define CAMERA_ID(ca) ((ca).id) 387 #define CAMERA_NAME(ca) ((ca)->name) 388 #define CAMERA_LOCATION(ca) (&(ca).location) 389 #define CAMERA_X_LOCATION(ca) ((ca).location.x) 390 #define CAMERA_Y_LOCATION(ca) ((ca).location.y) 391 #define CAMERA_Z_LOCATION(ca) ((ca).location.z) Definition: world_def.h:197
Definition: world_def.h:108
Definition: world_def.h:150
Definition: world_def.h:92
Definition: geometric.h:20
Definition: world_def.h:164
Definition: world_def.h:176
Definition: world_def.h:33
Definition: world_def.h:76
Definition: world_def.h:301
Definition: world_def.h:48
Definition: calibration.h:51
Definition: world_def.h:275
Definition: world_def.h:240
Definition: world_def.cpp:13
Definition: calibration.h:26
Definition: calibration.h:23
Definition: world_def.h:137
Definition: geometric.h:256
Definition: geometric.h:224
Definition: world_def.h:123