mirror of
https://github.com/kristoferssolo/Traffic-Light-Detector.git
synced 2025-10-21 20:00:36 +00:00
Changed package name
This commit is contained in:
parent
190d7613fc
commit
322c40669b
2
main.py
2
main.py
@ -25,7 +25,7 @@ def main(args) -> None:
|
|||||||
create_dirs()
|
create_dirs()
|
||||||
if args.webcam:
|
if args.webcam:
|
||||||
from TrafficLightDetector.traffic_light_webcam import TrafficLightDetectorWebcam
|
from TrafficLightDetector.traffic_light_webcam import TrafficLightDetectorWebcam
|
||||||
camera = TrafficLightDetectorWebcam()
|
camera = TrafficLightDetectorWebcam(0) # Change number if webcam didn't detect
|
||||||
camera.enable()
|
camera.enable()
|
||||||
|
|
||||||
if args.image:
|
if args.image:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = detector
|
name = TrafficLightDetector
|
||||||
desctiption = Reduce traffic congestion effects due to human reaction times at intersections with traffic lights by utilizing a computer system based on direct communication method of changes in the circumscribed route intersection.
|
desctiption = Reduce traffic congestion effects due to human reaction times at intersections with traffic lights by utilizing a computer system based on direct communication method of changes in the circumscribed route intersection.
|
||||||
author = Kristofers Solo
|
author = Kristofers Solo
|
||||||
license = MIT
|
license = MIT
|
||||||
|
|||||||
@ -4,8 +4,8 @@ from TrafficLightDetector.traffic_light_detector import TrafficLightDetector
|
|||||||
|
|
||||||
class TrafficLightDetectorWebcam(TrafficLightDetector):
|
class TrafficLightDetectorWebcam(TrafficLightDetector):
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self, source: int) -> None:
|
||||||
self.video_capture = cv2.VideoCapture(0) # Change number if webcam didn't detect
|
self.video_capture = cv2.VideoCapture(source)
|
||||||
|
|
||||||
def enable(self) -> None:
|
def enable(self) -> None:
|
||||||
while True:
|
while True:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user