bbi.camera.panchromatic¶
- pydantic model PanchromaticUpdateParam¶
Bases:
AnimationFrame- Validators:
- field weights: tuple[float, float, float] | None = None¶
- Validated by:
- class Panchromatic(joseph_service: JosephService, camera_id: str)¶
Bases:
Animatable[PanchromaticUpdateParam]Panchromatic sensor settings for a single camera.
A panchromatic image is a single band made from a weighted sum of the red, green and blue channels of the rendered image.
- property weights: tuple[float, float, float]¶
The red, green and blue channel weights.
- set_weights(r: float, g: float, b: float) None¶
Sets how much each colour channel contributes to the panchromatic band.
The weights must sum to 1
- Parameters:
r (float) – Weight of the red channel. Must not be negative.
g (float) – Weight of the green channel. Must not be negative.
b (float) – Weight of the blue channel. Must not be negative.
- Raises:
ValueError – If a weight is negative or not a finite number, or if the weights do not sum to 1.
- execute(frame_id: int, frame_max: int, delta_seconds: float) None¶
Updates the channel weights to the specified frame.
- Parameters:
frame_id (int) – The frame ID.
frame_max (int) – Max frame count in the current loop.
delta_seconds (float) – The target real-time in seconds between frames.
- class SupportsPanchromatic(node_id: str, transform: Transform, resolution: tuple[int, int], sensor_preset: CameraProfile)¶
Bases:
BaseCameraA camera with a panchromatic sensor.
- property panchromatic: Panchromatic¶
Panchromatic camera properties and settings.
- set_panchromatic_mode(enabled: bool) None¶
Enables or disables panchromatic mode for the camera.
Panchromatic mode renders a single band from a weighted sum of the red, green and blue channels. The current
panchromatic.weightsare sent to the camera each time the mode is enabled.- Parameters:
enabled (bool) – Whether to enable or disable panchromatic mode.