-
Notifications
You must be signed in to change notification settings - Fork 1
/
TargetTracker.robo
120 lines (116 loc) · 3.75 KB
/
TargetTracker.robo
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
<head><version>2.79.13</version></head>
<Axis_Internet_Camera>
<auto_back_light>TRUE</auto_back_light>
<auto_exposure>FALSE</auto_exposure>
<auto_white_balance>TRUE</auto_white_balance>
<brightness_value>50</brightness_value>
<color_level_value>50</color_level_value>
<compression_index>3</compression_index>
<contrast_value>50</contrast_value>
<exposure_value>50</exposure_value>
<ip_address>10.41.31.84</ip_address>
<is_active>TRUE</is_active>
<mirrot>FALSE</mirrot>
<port>80</port>
<resolution>320x240</resolution>
<sharpness_value>50</sharpness_value>
</Axis_Internet_Camera>
<RGB_Filter>
<channel>2</channel>
<hue_value>50</hue_value>
<hysteresis>5</hysteresis>
<min_value>100</min_value>
</RGB_Filter>
<Mean>
<filter_size>6</filter_size>
</Mean>
<Blob_Colorize>
<colors>#00FF00:green
</colors>
<color_index>5</color_index>
<comparison_mode>1</comparison_mode>
<sensitivity>75</sensitivity>
<source_image>Current</source_image>
<summation_weight>0.15</summation_weight>
<threshold>0</threshold>
</Blob_Colorize>
<Dilate>
<avoid_connection>FALSE</avoid_connection>
<count>12</count>
<dilate_borders>FALSE</dilate_borders>
<direction>1</direction>
<kernal_shape>4</kernal_shape>
</Dilate>
<Convex_Hull/>
<Blob_Size>
<limit>1</limit>
<mask>FALSE</mask>
<max_area>0</max_area>
<min_area>1500</min_area>
<threshold>5</threshold>
<treat_as_color_image>FALSE</treat_as_color_image>
</Blob_Size>
<Blob_Tracking>
<absent_after_frames>2</absent_after_frames>
<aspect_weight>1.0</aspect_weight>
<blob_image>Current</blob_image>
<color_weight>1.0</color_weight>
<display_as_annotation>FALSE</display_as_annotation>
<display_id>TRUE</display_id>
<display_trail>TRUE</display_trail>
<graphic_color_index>6</graphic_color_index>
<histogram_weight>1.0</histogram_weight>
<id_font_size_index>1</id_font_size_index>
<length_limit>150</length_limit>
<location_weight>1.0</location_weight>
<match_threshold>0.4</match_threshold>
<neg_x_length_limit>0</neg_x_length_limit>
<neg_y_length_limit>0</neg_y_length_limit>
<orientation_weight>1.0</orientation_weight>
<overlap_weight>1.0</overlap_weight>
<present_after_frames>2</present_after_frames>
<present_after_pixels>0</present_after_pixels>
<raw_image>Source</raw_image>
<remove_untracked_blobs>TRUE</remove_untracked_blobs>
<shape_weight>1.0</shape_weight>
<size_weight>1</size_weight>
<tracking_precision>1.0</tracking_precision>
<track_aspect>FALSE</track_aspect>
<track_color>TRUE</track_color>
<track_histogram>FALSE</track_histogram>
<track_location>FALSE</track_location>
<track_orientation>FALSE</track_orientation>
<track_overlap>TRUE</track_overlap>
<track_shape>FALSE</track_shape>
<track_size>FALSE</track_size>
<trail_length>5</trail_length>
<x_length_limit>0</x_length_limit>
<y_length_limit>0</y_length_limit>
</Blob_Tracking>
<Python_Program_v2x>
<auto_reload>TRUE</auto_reload>
<continue_on_errors>FALSE</continue_on_errors>
<script>import rr
if rr.GetVariable("BLOB_TRACKING"):
target = rr.GetArrayVariable("BLOB_TRACKING")
if len(target) == 2:
rr.SetVariable("Tracking", 1)
rr.SetVariable("TargetX", target[0])
rr.SetVariable("TargetY", target[1])
else:
rr.SetVariable("Tracking", 0)
rr.WaitImage()</script>
<source_mode>gui</source_mode>
<tab_size_index>1</tab_size_index>
</Python_Program_v2x>
<NetworkTables>
<delay>30</delay>
<filter_type_index>0</filter_type_index>
<hostname>10.41.31.2</hostname>
<port>1735</port>
<prefix>/SmartDashboard/</prefix>
<variables_to_send>TargetX
TargetY
Tracking</variables_to_send>
<variable_type_index>0</variable_type_index>
</NetworkTables>