fixed video path

This commit is contained in:
2024-06-29 13:26:47 +02:00
parent 24f907ac0f
commit ad3d10cb2e
2 changed files with 9 additions and 10 deletions
+3 -10
View File
@@ -6,6 +6,8 @@ import imutils as im
IMG_SCALE_UP = 1
SEARCH_AREA = 0.2
(major_ver, minor_ver, subminor_ver) = cv2.__version__.split('.')
print(cv2.__version__)
def bbox_extend(bbox: cv2.typing.Rect, search_area: float):
we2 = int(round(bbox[2]*search_area/2))
@@ -63,15 +65,6 @@ def match(image_bbox, image_template, current_angle):
return current_angle, best_maxLoc
(major_ver, minor_ver, subminor_ver) = cv2.__version__.split('.')
# Set up tracker.
# Instead of MIL, you can also use
print(cv2.__version__)
bbox = (100, 100, 100, 100)
bbox = bbox_extend(bbox, 0.5)
trackers = {
'KCF': cv2.TrackerKCF,
@@ -87,7 +80,7 @@ trackers = {
tracker_type = 'KCF'
tracker = trackers[tracker_type].create()
video = cv2.VideoCapture("/media/jens/Home/Videos/production_id 4525346 (1080p).mp4")
video = cv2.VideoCapture("./data/production_id 4525346 (1080p).mp4")
# Exit if video not open
# d.