Refactored

This commit is contained in:
2024-06-30 15:04:06 +02:00
parent 7463d46c24
commit 3b4a94d9df
4 changed files with 4 additions and 4 deletions
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+4 -4
View File
@@ -4,7 +4,7 @@ import numpy as np
import imutils as im
IMG_SCALE_UP = 1
TEMPLATE_MATCH_OVERLAP = 0.5
TEMPLATE_MATCH_OVERLAP = 0.0
(major_ver, minor_ver, subminor_ver) = cv2.__version__.split('.')
print(cv2.__version__)
@@ -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] + source.shape[0]/2 - 1
loc_y = best_max_loc[1] + source.shape[0]/2 - 1
loc_x = best_max_loc[0] + template.shape[0]/2 - 1
loc_y = best_max_loc[1] + template.shape[1]/2 - 1
return angle, (loc_x, loc_y)
@@ -124,7 +124,7 @@ trackers = {
tracker_type = 'KCF'
tracker = trackers[tracker_type].create()
video = cv2.VideoCapture("./data/IMG_1728.qt")
video = cv2.VideoCapture("./data/IMG_1730.MP4")
# Exit if video not open
# d.