-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathField.hpp
107 lines (104 loc) · 2.9 KB
/
Field.hpp
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
101
102
103
104
105
106
107
# ifndef MRL_SOCCER_PLAYGROUND_CONFIGS
# include "Configs.hpp"
# ifndef MRL_SOCCER_PLAYGROUND
/**
* @file Field.hpp
* @author Mobina Abforoosh (mobinaabf@gmail.com)
* @author Amir Yusefian (amiryn996@gmail.com)
* @author Erfan Zarabadi (mohammadspace39@gmail.com)
* @author Parsa Karbasi (ijackgonjishke@gmail.com)
* @author Alireza Mortezaei (alirezamortezaei50@gmail.com)
* @author Ramtin Kosari (ramtinkosari@gmail.com)
* @brief MRL HSL Soccer Filed Preview with OpenCV
* @version 1.0
* @date 2023-12-22
*/
# define MRL_SOCCER_PLAYGROUND
# endif // MRL_SOCCER_PLAYGROUND
/**
* @brief Playground ID Enumeration
*/
enum PlaygroundID {
OPPONENT_GOAL_AREA,
BACKGROUND_CIRCLE,
TEAM_GOAL_AREA,
NOT_NECCESSARY
};
/**
* @brief Rectangle Structure (Parsa Karbasi and Amir Yusefian)
*/
struct SoccerRectangle {
cv::Point topLeft;
cv::Point downRight;
int name_id;
};
/**
* @brief Circle Structure
*/
struct SoccerCircle {
cv::Point center;
int radius;
int name_id;
};
/**
* @brief Line Structure
*/
struct SoccerLine {
cv::Point start;
cv::Point end;
int name_id;
};
/**
* @brief MRL HSL Soccer Playground Class
* @details This class is used to create a soccer playground with OpenCV
*/
class SoccerPlayground {
private:
/**
* @brief Playground Initialization Status
*/
bool isInitialized;
/**
* @brief Playground Image
*/
cv::Mat preview;
/**
* @brief Playground Rectangles
*/
std::vector<SoccerRectangle> rectangles;
/**
* @brief Playground Circles
*/
std::vector<SoccerCircle> circles;
/**
* @brief Playground Lines
*/
std::vector<SoccerLine> lines;
public:
/**
* @brief Initialize Soccer Playground Object
*/
SoccerPlayground();
/**
* @brief Method to Get Playground Image
* @return cv::Mat
*/
cv::Mat getPlayground();
/**
* @brief Initialize Playground Rectangles
*/
void initRectangles();
/**
* @brief Initialize Playground Circles
*/
void initCircles();
/**
* @brief Initialize Playground Lines
*/
void initLines();
/**
* @brief Method to Draw Playground (Alireza Mortezaei)
*/
void drawPlayground();
};
# endif // MRL_SOCCER_PLAYGROUND_CONFIGS