Created
October 24, 2020 14:42
-
-
Save KMConner/0ad8622af8dc7bcdbd8327a229eaeb15 to your computer and use it in GitHub Desktop.
Take pictures using raspberry pi camera
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
cap = cv2.VideoCapture(0) | |
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 1024) | |
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1280) | |
ret, frame = cap.read() | |
print(ret) | |
cv2.imwrite('./foo.jpg', frame) | |
## requirements | |
# - numpy | |
# - opencv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment