P2DingoCV.Camera.ImageCamera
Classes
|
Camera subclass that reads either a single image or a sequence of images from a folder. |
- class P2DingoCV.Camera.ImageCamera.ImageCamera(path)[source]
Bases:
P2DingoCV.Camera.Camera.Camera
Camera subclass that reads either a single image or a sequence of images from a folder.
- Parameters:
path (str)
- imagePaths
Ordered list of image file paths to read.
- Type:
list[str]
- index
Current index in the imagePaths list.
- Type:
int
- frame
Last frame read from the camera.
- Type:
np.ndarray
Camera subclass that reads either a single image or a sequence of images from a folder.
- __init__(path)[source]
Initialize the ImageCamera with a file or directory path.
- Parameters:
path (str) – Path to an image file or a directory containing images.
- Raises:
ValueError – If the path is invalid or contains no supported images.
- Return type:
None
- read()[source]
Read the next image in the sequence.
- Returns:
The next image as a NumPy array, or None if at the end.
- Return type:
np.ndarray | None
- Raises:
IOError – If the image cannot be read.