-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
29 lines (21 loc) · 821 Bytes
/
main.py
File metadata and controls
29 lines (21 loc) · 821 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 time
from collections import defaultdict
from parameters_config import *
from vehicle_calculations import *
from camera_config import *
def main():
prev_frame_time = time.time()
prev_positions = defaultdict(lambda: None)
#VIDEO_PATH = r'Videos\BenchmarkVideo_Cut.mp4'
##VIDEO_PATH = r'/home/noe_ee/GradProject/Videos/BenchmarkVideo_Cut.mp4'
VIDEO_PATH = ""
cap = cv2.VideoCapture(0)
if cap.isOpened():
cap.release()
runWebCam(prev_positions, prev_frame_time, VIDEO_PATH ,video = False, show_window=True)
else:
cap.release()
#VIDEO_PATH = r'/home/noe_ee/GradProject/Videos/BenchmarkVideo_Cut.mp4'
#runWebCam(prev_positions, prev_frame_time, VIDEO_PATH ,video = True, show_window=True)
if __name__ == "__main__":
main()