We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e85b52 commit 2a2b77eCopy full SHA for 2a2b77e
.github/ci/runner_camera.py
examples/pytest_helpers.py
@@ -6,15 +6,19 @@
6
def bsp_capture_image(image_path):
7
# Return video from the first webcam on your computer.
8
cap = cv2.VideoCapture(0)
9
+ cap.set(cv2.CAP_PROP_AUTOFOCUS, 1)
10
+ cap.set(cv2.CAP_PROP_EXPOSURE, 7.0)
11
# reads frames from a camera
12
# ret checks return at each frame
13
ret, frame = cap.read()
14
if ret:
15
+ # Image rotation
16
+ frame_rotated = cv2.rotate(frame, cv2.ROTATE_180)
17
# TODO: Change size image
18
# TODO: Crop image
19
20
# Save image
- cv2.imwrite(image_path, frame)
21
+ cv2.imwrite(image_path, frame_rotated)
22
print(f"Image saved {image_path}")
23
else:
24
print("Cannot save image.")
0 commit comments