diff --git a/application/inputs.py b/application/inputs.py index 14a06db..d7c6db3 100644 --- a/application/inputs.py +++ b/application/inputs.py @@ -9,9 +9,13 @@ class WebcamInput(Input): def __init__(self, cam_id, resolution): self.cam_id = cam_id self.resolution = resolution + def start(self): self.cam = cv2.VideoCapture(self.cam_id, cv2.CAP_DSHOW) + # Set camera resolution to FHD to ensure 16:9 aspect ratio + self.cam.set(cv2.CAP_PROP_FRAME_HEIGHT, 1080) + self.cam.set(cv2.CAP_PROP_FRAME_WIDTH, 1920) def get_inputs(self): s, img = self.cam.read() diff --git a/run.bat b/run.bat index eedb1e9..d804346 100644 --- a/run.bat +++ b/run.bat @@ -1,3 +1,3 @@ -python run.py -Rem start python run.py -Rem "C:\Program Files\Google\Chrome\Application\chrome.exe" --kiosk "http://localhost:8123" \ No newline at end of file +python run.py application +Rem start python run.py application +Rem "C:\Program Files\Google\Chrome\Application\chrome.exe" --kiosk "http://localhost:8123/launch" \ No newline at end of file