P2DingoCV.Camera.VideoCamera
Classes
|
Camera subclass that reads frames from a webcam, camera device, or video file. |
- class P2DingoCV.Camera.VideoCamera.VideoCamera(source=0)[source]
Bases:
P2DingoCV.Camera.Camera.Camera
Camera subclass that reads frames from a webcam, camera device, or video file.
- Parameters:
source (int | str)
- cap
OpenCV video capture object.
- Type:
cv.VideoCapture
- frame
Last frame read from the camera.
- Type:
np.ndarray | None
- source
Device index or video file path.
- Type:
int | str
Camera subclass that reads frames from a webcam, camera device, or video file.
- __init__(source=0)[source]
Initialize the VideoCamera with a device index or video file path.
- Parameters:
source (int | str) – Camera device index or path to a video file.
- Raises:
ValueError – If the video source cannot be opened.
- Return type:
None