Skip to content

Commit f22457f

Browse files
committed
Cam rotation and focus
1 parent 2e85b52 commit f22457f

File tree

2 files changed

+4
-21
lines changed

2 files changed

+4
-21
lines changed

.github/ci/runner_camera.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

examples/pytest_helpers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@
66
def bsp_capture_image(image_path):
77
# Return video from the first webcam on your computer.
88
cap = cv2.VideoCapture(0)
9+
cap.set(cv2.CAP_PROP_AUTOFOCUS, 1)
10+
cap.set(cv2.CAP_PROP_EXPOSURE, -7.0)
911
# reads frames from a camera
1012
# ret checks return at each frame
1113
ret, frame = cap.read()
1214
if ret:
15+
# Image rotation
16+
frame = cv2.rotate(frame, cv2.ROTATE_180)
1317
# TODO: Change size image
1418
# TODO: Crop image
1519

0 commit comments

Comments
 (0)