Class CameraSensor¶
Defined in File meta_camera_sensor.h
Inheritance Relationships¶
Base Type¶
public ouster::sdk::osf::MetadataEntryHelper< CameraSensor >Template Class MetadataEntryHelper
Class Documentation¶
-
class CameraSensor : public ouster::sdk::osf::MetadataEntryHelper<CameraSensor>¶
Metadata entry storing a camera sensor’s metadata (ouster::sdk::core::CameraInfo) as a JSON string in the OSF footer.
This mirrors LidarSensor but uses a distinct OSF type string (“ouster/v1/os_sensor/CameraSensor”). Keeping camera metadata under its own type is deliberate: OSF readers that predate camera support don’t recognize this type and therefore skip it as an opaque (unknown) metadata entry rather than attempting to validate a CameraInfo as a LidarInfo - which would fail (missing beam intrinsics / columns_per_frame) and abort opening the whole file. As a result, older readers can still consume the lidar streams while silently ignoring the camera streams.
OSF type: ouster/v1/os_sensor/CameraSensor
Flat Buffer Reference: fb/os_sensor/camera_sensor.fbs
Public Functions
-
explicit CameraSensor(const ouster::sdk::core::CameraInfo &camera_info)¶
- Parameters:
camera_info[in] Initialize the entry with a CameraInfo object.
-
explicit CameraSensor(const std::string &sensor_metadata)¶
- Parameters:
sensor_metadata[in] Initialize the entry with a json string representation of a CameraInfo object.
-
std::shared_ptr<ouster::sdk::core::SensorInfo> sensor_info() const¶
Returns the sensor metadata associated with this entry as the polymorphic base type.
Downcast with std::dynamic_pointer_cast to obtain the concrete CameraInfo.
- Returns:
The SensorInfo associated with this entry.
-
const ouster::sdk::core::CameraInfo &info() const¶
Returns the CameraInfo associated with the entry.
- Throws:
std::runtime_error – if this entry does not store a CameraInfo.
- Returns:
The CameraInfo associated with the entry.
-
const std::string &metadata() const¶
Returns the json string representation of the sensor_info associated with the CameraSensor.
- Returns:
The json string representation of the sensor_info object.
-
virtual std::vector<uint8_t> buffer() const final¶
Byte representation of the internal derived metadata type, used as serialization function when saving to OSF file.
- Returns:
The byte vector representation of the metadata.
-
virtual std::string to_string() const override¶
Get the string representation for the CameraSensor object.
- Returns:
The string representation for the CameraSensor object.
-
static std::unique_ptr<MetadataEntry> from_buffer(const OsfBuffer &buf)¶
Create a CameraSensor object from a byte array.
- Parameters:
buf[in] The raw flatbuffer byte vector to initialize from.
- Returns:
The new CameraSensor cast as a MetadataEntry
-
virtual std::string repr() const override¶
Get the string representation for the CameraSensor object.
- Returns:
The string representation for the CameraSensor object.
-
explicit CameraSensor(const ouster::sdk::core::CameraInfo &camera_info)¶