fix(input/gestures): restore Iterator[np.ndarray] return type on frames()

This commit is contained in:
pyr0ball 2026-04-26 20:48:50 -07:00
parent 0f5ea86ab0
commit 73f694ed3a

View file

@ -10,6 +10,7 @@ from __future__ import annotations
from typing import Iterator from typing import Iterator
import cv2 import cv2
import numpy as np
class CameraCapture: class CameraCapture:
@ -38,7 +39,7 @@ class CameraCapture:
def is_open(self) -> bool: def is_open(self) -> bool:
return self._cap.isOpened() return self._cap.isOpened()
def frames(self) -> Iterator: def frames(self) -> Iterator[np.ndarray]:
"""Yield BGR uint8 frames until camera fails or caller breaks.""" """Yield BGR uint8 frames until camera fails or caller breaks."""
while self._cap.isOpened(): while self._cap.isOpened():
ok, frame = self._cap.read() ok, frame = self._cap.read()