-
Notifications
You must be signed in to change notification settings - Fork 1
/
Setup.h
136 lines (96 loc) · 3.16 KB
/
Setup.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
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#pragma once
#include <string>
#include "spdlog/spdlog.h"
namespace Lightning
{
namespace Setup
{
const static std::string LogPath = "InfiniteRechargeVision.log";
const static std::string SetupPath = "setup.ini";
void LoadSetup();
void SaveSetup();
namespace Camera
{
// Default camera id
extern int CameraId;
// Image width
extern int Width;
// Image height
extern int Height;
}
namespace Network
{
// Default port for sending data to robot
extern int DataPort;
}
namespace Diagnostics
{
// Use saved image instead of camera
extern bool UseTestImage;
// Path to test image
extern std::string TestImagePath;
// Use saved video instead of camera
extern bool UseTestVideo;
// Path to test video
extern std::string TestVideoPath;
// Log Level
extern spdlog::level::level_enum LogLevel;
// Display development images
extern bool DisplayDebugImages;
// Record and save raw video for diagnostics
extern bool RecordVideo;
// Record and save processed video
extern bool RecordProcessedVideo;
// Folder in which to save videos
extern std::string RecordVideoPath;
// Read setup file during execution to adjust program behavior in real time
extern bool ReadSetupFile;
// Wait time for displaying images - 0 will pause the display until a key is pressed
extern int WaitKeyDelay;
}
namespace Processing
{
// Minimum size of contours
extern int ContourSizeThreshold;
// Accuracy setting for approxPolyDP function
extern double ContourApproximationAccuracy;
// Minimum threshold for shape factor filter
extern double ShapeFactorMin;
// Maximum threshold for shape factor filter
extern double ShapeFactorMax;
// Distance threshold for close corner points
extern int CornerDistanceThreshold;
// Number of iterations for corner subpixel calculation
extern int MaxCornerSubPixelIterations;
// Threshold for corner subpixel calculation
extern double CornerSubPixelThreshold;
// Switch for world coordinates or camera coordinates in final answer
extern bool UseWorldCoordinates;
// X Offset for hatch camera in millimeters
extern double XOffset;
// Y Offset for hatch camera in millimeters
extern double YOffset;
// Z Offset for hatch camera in millimeters
extern double ZOffset;
// Distance from edge of image before contour is rejected
extern double ImageEdgeThreshold;
}
namespace HSVFilter
{
// Low Hue limit
extern int LowH;
// Low Saturation limit
extern int LowS;
// Low Value limit
extern int LowV;
// High Hue limit
extern int HighH;
// High Saturation limit
extern int HighS;
// High Value limit
extern int HighV;
// Number of morphology iterations
extern int MorphologyIterations;
}
}
}