-
-
Save parzibyte/f9c8f67df1954f21b0594dc533a5d8f5 to your computer and use it in GitHub Desktop.
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
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