I/O API
trackers.io.video.frames_from_source(source)
Yield numbered BGR frames from video files, webcams, network streams, or image directories.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
Union[str, Path, int]
|
Video file path, RTSP/HTTP stream URL, webcam index, or path to a
directory containing images ( |
required |
Returns:
| Type | Description |
|---|---|
Iterator[tuple[int, ndarray]]
|
Iterator of |
Iterator[tuple[int, ndarray]]
|
is a |
Raises:
| Type | Description |
|---|---|
ValueError
|
Source cannot be opened or directory contains no supported images. |
OSError
|
Image file exists but cannot be decoded / read. |
RuntimeError
|
Capture read failure after successful open. |