Refactored
This commit is contained in:
+3
-5
@@ -66,8 +66,8 @@ def template_match_rotation(source, template, angle, center, rot_min=-1.0, rot_m
|
||||
break
|
||||
|
||||
angle += best_angle
|
||||
loc_x = best_max_loc[0] + template.shape[0]/2 - 1
|
||||
loc_y = best_max_loc[1] + template.shape[1]/2 - 1
|
||||
loc_x = best_max_loc[0]
|
||||
loc_y = best_max_loc[1]
|
||||
|
||||
return angle, (loc_x, loc_y)
|
||||
|
||||
@@ -150,10 +150,8 @@ tracker.create()
|
||||
tracker.init(frame_init, bbox_init)
|
||||
|
||||
current_angle = 0
|
||||
#line_from = (ref_center[0] + bbox_template[0], ref_center[1] + bbox_template[1])
|
||||
line_from = None
|
||||
|
||||
path = []
|
||||
line_from = None
|
||||
|
||||
while True:
|
||||
# Read a new frame
|
||||
|
||||
Reference in New Issue
Block a user