This repository was archived by the owner on Dec 30, 2025. It is now read-only.
forked from bradenhurl/GTAV_ObjectDetection
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFrameObjectInfo.h
More file actions
100 lines (78 loc) · 2.18 KB
/
FrameObjectInfo.h
File metadata and controls
100 lines (78 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#pragma once
#include <map>
struct ObjEntity {
int entityID;
int classID;
//Consistent with kitti coordinate system (relative to camera)
Vector3 location;
Vector3 worldPos;//To reduce calculations. Center of object at it's bottom
float speed;
float heading;
float height;
float width;
float length;
Vector3 dim;
Vector3 offcenter;
float rotation_y;
float alpha;
float distance;
BBox2D bbox2d;
BBox2D bbox2dUnprocessed;
int pointsHit3D;
int pointsHit2D;
float truncation;
float occlusion;
Hash model;
std::string modelString;
std::string objType;
int trackFirstFrame; //First frame (of sequence) it is seen in
//These are in world coords right now (probably needs to be changed)
float pitch;
float roll;
bool isPedInV = false;
int vPedIsIn;
//The following are saved to reduce calculations for checking if each pixels
//resides in the 3D bounding box of an entity
//Vectors which transform from vehicle into world coordinates
Vector3 xVector;
Vector3 yVector;
Vector3 zVector;
Vector3 u;
Vector3 v;
Vector3 w;
Vector3 rearBotLeft;
Vector3 frontBotLeft;
Vector3 rearTopLeft;
Vector3 rearBotRight;
Vector3 rearMiddleLeft;
Vector3 rearThirdLeft;
Vector3 rearTopExactLeft;
ObjEntity(int _entityID) : entityID(_entityID) {};
ObjEntity() {};
};
typedef std::pair<int, ObjEntity> EntityMapEntry;
typedef std::map<int, ObjEntity> EntityMap;
struct FrameObjectInfo
{
int instanceIdx;
int seriesIdx;
Vector3 position;
float heading;
float roll;
float pitch;
//In world coordinates
Vector3 forwardVec;
Vector3 rightVec;
Vector3 upVec;
Vector3 camPos;
Vector3 kittiWorldPos;//Bottom center (after correcting for offset) in GTA world coords
float speed;
float yawRate;
float focalLen;
int timeHours;//In-game time of day (hours)
//These are maps for when we do 4 cameras for full LiDAR
//It will enable quicker checking to see if entity is already discovered
EntityMap vehicles;
EntityMap peds;
std::vector<Vector3> groundPlanePoints;
};