- Interactive mission selector with metadata-driven design - 5 educational missions (basics + advanced) - AI assistant roles (Deepbit, Bugsy, Schnippsi, Tobi) - SnakeCam gesture recognition system - Token tracking utilities - CLAUDE.md documentation - .gitignore for logs and secrets
14 lines
367 B
Python
Executable File
14 lines
367 B
Python
Executable File
import cv2
|
|
|
|
def gen_frames():
|
|
cap = cv2.VideoCapture(0)
|
|
while True:
|
|
success, frame = cap.read()
|
|
if not success:
|
|
break
|
|
else:
|
|
ret, buffer = cv2.imencode('.jpg', frame)
|
|
frame = buffer.tobytes()
|
|
yield (b'--frame\r\n'
|
|
b'Content-Type: image/jpeg\r\n\r\n' + frame + b'\r\n')
|