-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFrameData.h
More file actions
99 lines (80 loc) · 1.74 KB
/
Copy pathFrameData.h
File metadata and controls
99 lines (80 loc) · 1.74 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
#ifndef FRAMEDATA_H
#define FRAMEDATA_H
#include <opencv.hpp>
enum TrackingMethod
{
NoTracking,
TrackingSAD,
TrackingSSD,
TrackingMethodCount
};
class PlanarTracker;
extern const char *TrackingMethodStr[];
//one frame of the sequence
class FrameData
{
public:
cv::Mat frame;
FrameData(cv::Mat frame);
};
//point values at one frame
class PointData
{
public:
cv::Point2f p;//position of the point
TrackingMethod trackMethod;
cv::Size patchSize;
cv::Size winSize;
PointData();
PointData *clone();
};
class Point
{
public:
std::vector<PointData*> pointData; //point values at each frame, NULL if not computed at a frame
PointData *getData(int id);
void setData(int id, PointData *data);
};
class Line
{
public:
Point *p[2];//ptr to the 2 points of the line
Line();
};
class ShapeData
{
public:
std::vector<Point*> vertex;//list of the points that define the shape
bool manual;//true if the shape has been manually defined
bool visible;
bool computed;//true if the shape has been computed (tracked or manually defined)
cv::Mat homography;//homography from the first frame
std::vector<cv::Rect> listPatch;
PlanarTracker *matcher;
ShapeData();
};
class Shape
{
public:
std::vector<ShapeData*> shapeData;//shapeData for each frame
int maxPoints;
Shape();
~Shape();
ShapeData *getData(int frame);
};
class VideoData
{
public:
std::string videoFile;
std::vector<FrameData> listFrames;
std::vector<Shape*> listShapes;
std::vector<Point*> listPoints;
std::vector<Line*> listLines;
double fps;
Shape *currentShape;
Line *currentLine;
Point *currentPoint;
int currentFrame;
VideoData();
};
#endif // FRAMEDATA_H