navigate.model.devices.camera.format.CameraImageFormat
- class navigate.model.devices.camera.format.CameraImageFormat(dtype: str = 'uint16', bit_depth: Optional[int] = None)
Bases:
objectDescribe unpacked, right-aligned monochrome arrays delivered by a driver.
- Parameters:
dtype (str) – Unsigned array type: uint8 or uint16. Legacy drivers use uint16.
bit_depth (int, optional) – Number of meaningful output bits. None means unknown, even when the storage width is known. It is not inferred from an image’s maximum value.
- __init__(dtype: str = 'uint16', bit_depth: Optional[int] = None) → None
Methods
__init__([dtype, bit_depth])for_bit_depth(bit_depth)Choose the smallest supported array type preserving all output bits.
Attributes
- classmethod for_bit_depth(bit_depth: int) → CameraImageFormat
Choose the smallest supported array type preserving all output bits.
- Parameters:
bit_depth (int) – Confirmed camera output precision, from 1 to 16 bits.
- Returns:
An unsigned byte or unsigned 16-bit word format.
- Return type:
- bit_depth: Optional[int] = None
- property bytes_per_pixel: int
Return storage bytes per pixel, independently of meaningful bits.
- dtype: str = 'uint16'