cv3.video.VideoInterface
- class cv3.video.VideoInterface[source]
Bases:
objectBase class for video operations.
This class provides common functionality for both VideoCapture and VideoWriter classes. It implements context manager support and basic video stream operations.
- stream
The underlying OpenCV video stream.
- width
Width of the video frames.
- Type:
int
- height
Height of the video frames.
- Type:
int
- stream = None
- width = None
- height = None
- isOpened()[source]
Check if the video stream is opened.
- Returns:
True if the stream is opened, False otherwise.
- Return type:
bool
- property is_opened
Check if the video stream is opened (property version).
- Type:
bool
- release()[source]
Release the video stream and free associated resources.
Note
If the stream has not been started, a warning will be issued.
- property shape
Shape of the video frames as (width, height).
- Type:
tuple
- __enter__()[source]
Enter the runtime context for the video stream.
- Returns:
This video interface instance.
- Return type: