@@ -45,16 +45,19 @@ def pytest_collection_modifyitems(config, items):
4545
4646def bsp_capture_image (image_path , board ):
4747 # Enable auto-focus
48- subprocess .run (["v4l2-ctl" , "-d" , "/dev/video0" , "--set-ctrl=focus_auto=1" ])
48+ # subprocess.run(["v4l2-ctl", "-d", "/dev/video0", "--set-ctrl=focus_auto=1"])
49+ # Manual focus
50+ subprocess .run (["v4l2-ctl" , "-d" , "/dev/video0" , "--set-ctrl=focus_auto=0" ])
51+ subprocess .run (["v4l2-ctl" , "-d" , "/dev/video0" , "--set-ctrl=focus_absolute=20" ])
4952 # Manual exposition
5053 subprocess .run (["v4l2-ctl" , "-d" , "/dev/video0" , "--set-ctrl=exposure_auto=1" ])
51- subprocess .run (["v4l2-ctl" , "-d" , "/dev/video0" , "--set-ctrl=exposure_absolute=100 " ])
54+ subprocess .run (["v4l2-ctl" , "-d" , "/dev/video0" , "--set-ctrl=exposure_absolute=1 " ])
5255
5356 # Return video from the first webcam on your computer.
5457 cap = cv2 .VideoCapture (0 )
5558 # Set FullHD resolution (1920x1080)
56- cap .set (cv2 .CAP_PROP_FRAME_WIDTH , 1920 )
57- cap .set (cv2 .CAP_PROP_FRAME_HEIGHT , 1080 )
59+ cap .set (cv2 .CAP_PROP_FRAME_WIDTH , 1280 )
60+ cap .set (cv2 .CAP_PROP_FRAME_HEIGHT , 720 )
5861
5962 # TODO: Camera calibration
6063
0 commit comments