Struct CameraInfo¶
Defined in File camera_info.h
Inheritance Relationships¶
Base Type¶
public ouster::sdk::core::SensorInfoStruct SensorInfo
Struct Documentation¶
-
struct CameraInfo : public ouster::sdk::core::SensorInfo¶
Metadata describing a camera sensor (intrinsics, extrinsics, image size).
Inherits shared calibration fields from SensorInfo (sn, sensor_to_body, imu_to_sensor_transform). 3D projection is derived from the pinhole intrinsics (model) by the shared XYZLut; cameras do not carry the lidar-specific beam intrinsics or beam/lidar transforms.
The model is optional, and the distinction matters: with one, the camera’s RANGE can be projected into a point cloud; without one, the imagery can only be viewed, and an XYZLut built from it is empty (0x0) rather than inventing intrinsics. The same applies to a camera with a zero width or height.
Public Functions
-
CameraInfo()¶
The default constructor creates an invalid camera info.
-
explicit CameraInfo(const std::string &json_string)¶
Construct a CameraInfo by parsing a JSON metadata string.
- Parameters:
json_string[in] JSON-formatted string representing camera metadata.
- Throws:
std::runtime_error – if the metadata string is empty or malformed.
-
CameraInfo(const CameraInfo &other)¶
Copy constructor.
- Parameters:
other[in] CameraInfo to copy from.
-
CameraInfo &operator=(const CameraInfo &other)¶
Copy assignment operator.
-
CameraInfo(CameraInfo &&other)¶
Move constructor.
Not marked noexcept for the same reason as SensorInfo’s: it is defaulted out-of-line and the base’s move is not noexcept, so the compiler must deduce the exception specification.
- Parameters:
other[in] CameraInfo to move from.
-
CameraInfo &operator=(CameraInfo &&other)¶
Move assignment operator.
Not marked noexcept for the same reason as the move constructor above.
-
~CameraInfo() override¶
Destructor.
-
virtual std::string to_json_string() const override¶
Return a JSON serialized version of this CameraInfo.
- Returns:
JSON serialized version of this CameraInfo.
-
virtual size_t w() const override¶
Frame width (number of columns), i.e.
image width in pixels.
- Returns:
image width in pixels.
-
virtual size_t h() const override¶
Frame height (number of rows), i.e.
image height in pixels.
- Returns:
image height in pixels.
-
virtual int fps() const override¶
Frame rate of this camera.
- Returns:
the value of frame_rate, in frames per second.
-
virtual bool could_be_synchronized() const override¶
Whether this camera can be synchronized with other sensors.
- Returns:
false; cameras carry no synchronization source.
-
virtual double latency() const override¶
Delay between the start of a capture and the frame’s timestamp.
- Returns:
0.0; camera capture latency is not currently modeled.
-
virtual std::shared_ptr<SensorInfo> clone() const override¶
Polymorphic copy.
- Returns:
a shared_ptr to a copy of this CameraInfo.
Public Members
-
CameraDataFormat format = {}¶
data format for this camera
-
nonstd::optional<CameraModel> model¶
Pinhole intrinsics for this camera, when it is calibrated.
Absent means the imagery can be visualized but not projected: nothing guesses a focal length on the caller’s behalf. Present asserts that the imagery is rectified, since the projection path applies no undistortion.
-
CameraInfo()¶