mirror of
https://github.com/boltgolt/howdy.git
synced 2024-09-19 09:51:19 +02:00
use variables from config.ini frame_height frame_width for camera resolution
This commit is contained in:
parent
7e896de2cb
commit
9ac6488834
1 changed files with 7 additions and 0 deletions
|
@ -85,6 +85,13 @@ video_capture = cv2.VideoCapture(int(config.get("video", "device_id")))
|
|||
if config.get("video", "force_mjpeg") == "true":
|
||||
video_capture.set(cv2.CAP_PROP_FOURCC, 1196444237)
|
||||
|
||||
# Set the frame width and height if requested
|
||||
if int(config.get("video", "frame_width")) != -1:
|
||||
video_capture.set(cv2.CAP_PROP_FRAME_WIDTH, int(config.get("video", "frame_width")))
|
||||
|
||||
if int(config.get("video", "frame_height")) != -1:
|
||||
video_capture.set(cv2.CAP_PROP_FRAME_HEIGHT, int(config.get("video", "frame_height")))
|
||||
|
||||
# Request a frame to wake the camera up
|
||||
video_capture.read()
|
||||
|
||||
|
|
Loading…
Reference in a new issue