-
Notifications
You must be signed in to change notification settings - Fork 0
/
dataStructures.h
40 lines (28 loc) · 1.5 KB
/
dataStructures.h
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
#ifndef dataStructures_h
#define dataStructures_h
#include <vector>
#include <map>
#include <opencv2/core.hpp>
struct LidarPoint { // single lidar point in space
double x,y,z,r; // x,y,z in [m], r is point reflectivity
};
struct BoundingBox { // bounding box around a classified object (contains both 2D and 3D data)
int boxID; // unique identifier for this bounding box
int trackID; // unique identifier for the track to which this bounding box belongs
cv::Rect roi; // 2D region-of-interest in image coordinates
int classID; // ID based on class file provided to YOLO framework
double confidence; // classification trust
std::vector<LidarPoint> lidarPoints; // Lidar 3D points which project into 2D image roi
std::vector<cv::KeyPoint> keypoints; // keypoints enclosed by 2D roi
std::vector<cv::DMatch> kptMatches; // keypoint matches enclosed by 2D roi
};
struct DataFrame { // represents the available sensor information at the same time instance
cv::Mat cameraImg; // camera image
std::vector<cv::KeyPoint> keypoints; // 2D keypoints within camera image
cv::Mat descriptors; // keypoint descriptors
std::vector<cv::DMatch> kptMatches; // keypoint matches between previous and current frame
std::vector<LidarPoint> lidarPoints;
std::vector<BoundingBox> boundingBoxes; // ROI around detected objects in 2D image coordinates
std::map<int,int> bbMatches; // bounding box matches between previous and current frame
};
#endif /* dataStructures_h */