Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created February 10, 2021 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/f9c8f67df1954f21b0594dc533a5d8f5 to your computer and use it in GitHub Desktop.
Save parzibyte/f9c8f67df1954f21b0594dc533a5d8f5 to your computer and use it in GitHub Desktop.
def obtener_frame_camara():
ok, frame = camara.read()
if not ok:
return False, None
# Codificar la imagen como JPG
_, bufer = cv2.imencode(".jpg", frame)
imagen = bufer.tobytes()
return True, imagen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment