Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
— |
motion_detection [2025/05/07 21:18] (aktuell) jango angelegt |
||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | =====Software===== | ||
+ | * [[https:// | ||
+ | |||
+ | =====Yolo===== | ||
+ | |||
+ | <code python> | ||
+ | import torch | ||
+ | import cv2 | ||
+ | |||
+ | model = torch.hub.load(' | ||
+ | |||
+ | cap = cv2.VideoCapture(" | ||
+ | # cap = cv2.VideoCapture(0) # First device in list | ||
+ | |||
+ | while cap.isOpened(): | ||
+ | | ||
+ | ret, frame = cap.read() | ||
+ | |||
+ | results = model(frame) | ||
+ | |||
+ | cv2.imshow(' | ||
+ | |||
+ | key = cv2.waitKey(1) | ||
+ | |||
+ | cap.release() | ||
+ | cv2.destroyAllWindows() | ||
+ | </ |