TADBot / camera.py
ryefoxlime's picture
FER Working on RPi with ~30sec predict time
a583b5e
raw
history blame
225 Bytes
import cv2
# initialize the camera
cap = cv2.VideoCapture(0, cv2.CAP_V4L2)
# capture a frame
ret, frame = cap.read()
# release the camera
cap.release()
# save the captured frame
cv2.imwrite('captured_image.jpg', frame)