-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
29 lines (19 loc) · 691 Bytes
/
main.py
File metadata and controls
29 lines (19 loc) · 691 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import cv2 # type: ignore
import camera.camera_video as gravacao
import core.processador as processador
def main():
video = gravacao.CameraGravacao()
proc= processador.TrackerProcessador()
try:
while True:
frame_processado = proc.aguardar_novo_frame(timeout=0.01)
if frame_processado is None:
continue
cv2.imshow('YOLO Detections (Left) | Tracking Results (Right)', frame_processado)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
finally:
video.parar()
cv2.destroyAllWindows()
if __name__ == "__main__":
main()