raillabel.format.camera module

class raillabel.format.camera.Camera(intrinsics: IntrinsicsPinhole, extrinsics: Transform | None = None, uri: str | None = None, description: str | None = None, TYPE: str = 'camera')

Bases: object

A camera sensor.

TYPE: str = 'camera'
description: str | None = None

Additional information about the sensor.

extrinsics: Transform | None = None

External calibration of the sensor defined by the 3D transform to the coordinate system origin.

classmethod from_json(json_stream: JSONStreamCamera, json_coordinate_system: JSONCoordinateSystem) Camera

Construct an instant of this class from RailLabel JSON data.

intrinsics: IntrinsicsPinhole

The intrinsic calibration of the sensor.

to_json() tuple[JSONStreamCamera, JSONCoordinateSystem]

Export this object into the RailLabel JSON format.

uri: str | None = None

Name of the subdirectory containing the sensor files.

raillabel.format.camera._extrinsics_from_json(json_transform: JSONTransformData | None) Transform | None