Files
HVideoTool/hvideotool/core/video/frame.py
T

15 lines
375 B
Python

"""Decoded video frame passed from the reader to the detector."""
from __future__ import annotations
from dataclasses import dataclass
import numpy as np
@dataclass
class Frame:
image: np.ndarray # BGR, HxWx3, uint8 (OpenCV convention)
index: int # 0-based frame counter since the last open/seek
pts: float # presentation timestamp, seconds