Contents:
vidsz.opencv.reader package¶
Submodules¶
vidsz.opencv.reader.base_reader module¶
Implements vidsz.interfaces.IReader interface for OpenCV Backend.
- class vidsz.opencv.reader.base_reader.Reader(source_name: Union[str, int], batch_size: Optional[int] = None, dynamic_batch: Optional[bool] = False, **kwargs)¶
Bases:
vidsz.interfaces.reader.IReaderVideo Reading wrapper around Opencv-Backend
- property backend: str¶
Name of the Backend being used
- Returns
current backend name
- Return type
str
- property fps: float¶
FPS of Video
- Returns
fps of video
- Return type
float
- property frame_count: int¶
Total frames read
- Returns
read frames’ count
- Return type
int
- property height: int¶
Height of Video
- Returns
height of video frame
- Return type
int
- property info: dict¶
Video information
- Returns
info of width, height, fps and backend.
- Return type
dict
- is_open() → bool¶
Checks if video is still open and last read frame was valid
- Returns
True if video is open and last frame was not None, false otherwise.
- Return type
bool
- property minutes: float¶
Total minutes read
- Returns
read frames’ in minutes
- Return type
float
- property name: str¶
Name of Video Source
- Returns
name of video source
- Return type
str
- read() → Optional[numpy.ndarray]¶
Returns next frame or batch of frames from the video if available
- Returns
next frame or batch of frames if available, None otherwise.
- Return type
Union[np.ndarry, None]
- read_batch() → Optional[numpy.ndarray]¶
Returns next batch of frames from the video if available
- Returns
next batch if available, None otherwise.
- Return type
Union[np.ndarry, None]
- read_frame() → Optional[numpy.ndarray]¶
Returns next frame from the video if available
- Returns
next frame if available, None otherwise.
- Return type
Union[np.ndarry, None]
- release() → None¶
Release Resources
- property seconds: float¶
Total seconds read
- Returns
read frames’ in seconds
- Return type
float
- property width: int¶
Width of Video
- Returns
width of video frame
- Return type
int
Module contents¶
Implements vidsz’s Reader for Opencv Backend