Refactored

This commit is contained in:
2024-06-30 15:46:01 +02:00
parent 3b4a94d9df
commit 3233b10700
+3 -5
View File
@@ -66,8 +66,8 @@ def template_match_rotation(source, template, angle, center, rot_min=-1.0, rot_m
break break
angle += best_angle angle += best_angle
loc_x = best_max_loc[0] + template.shape[0]/2 - 1 loc_x = best_max_loc[0]
loc_y = best_max_loc[1] + template.shape[1]/2 - 1 loc_y = best_max_loc[1]
return angle, (loc_x, loc_y) return angle, (loc_x, loc_y)
@@ -150,10 +150,8 @@ tracker.create()
tracker.init(frame_init, bbox_init) tracker.init(frame_init, bbox_init)
current_angle = 0 current_angle = 0
#line_from = (ref_center[0] + bbox_template[0], ref_center[1] + bbox_template[1])
line_from = None
path = [] path = []
line_from = None
while True: while True:
# Read a new frame # Read a new frame