Auterion App SDK
Auterion SDK is a library that can be used by AuterionOS apps to communicate with the system.
Loading...
Searching...
No Matches
auterion::ImageHeader Struct Reference

Contains image metadata. More...

#include <auterion_sdk/camera/camera.hpp>

Public Types

enum class  Encoding {
  Unknown , Y800 , Y16 , UYVY ,
  YUY2 , I420 , NV12 , RGB8 ,
  BGR8 , BA81 , GBRG , GRBG ,
  RGGB , RGBA
}
 Image encoding, following FourCC. More...
 

Public Member Functions

 ImageHeader (int width_, int height_, Encoding encoding_, int step_=0)
 
template<typename ImageT = auterion_core_msgs::msg::Image8m>
 ImageHeader (const ImageT &image)
 
template<typename ImageT = auterion_core_msgs::msg::Image8m>
void toImage (ImageT &image)
 
size_t planeOffset (int plane) const
 
size_t planeSizeBytes (int plane) const
 
size_t imageSizeBytes () const
 

Public Attributes

int width {}
 
int height {}
 
int step {}
 full row size in bytes
 
Encoding encoding {Encoding::Unknown}
 
rclcpp::Time timestamp {}
 
std::optional< uint64_t > monotonic_timestamp_us {std::nullopt}
 hardware timestamp [μs]
 
uint32_t frame_id {}
 incremental frame id
 
std::optional< rclcpp::Time > mid_exposure_timestamp {std::nullopt}
 
uint32_t exposure_time_us {}
 
int32_t readout_us {}
 
float framerate {0.f}
 
sensor_msgs::msg::CameraInfo camera_info {}
 

Detailed Description

Contains image metadata.

Member Enumeration Documentation

◆ Encoding

Image encoding, following FourCC.

Enumerator
Y800 

8 bit monochrome image (GREY), https://fourcc.org/pixel-format/yuv-y800/

Y16 

16 bit monochrome image, https://fourcc.org/pixel-format/yuv-y16/

UYVY 

YUV 4:2:2, https://fourcc.org/pixel-format/yuv-uyvy/.

YUY2 

YUV 4:2:2 (YUYV), https://fourcc.org/pixel-format/yuv-yuy2/.

I420 

YUV 4:2:0, https://fourcc.org/pixel-format/yuv-i420/.

NV12 

YUV 4:2:0, https://fourcc.org/pixel-format/yuv-nv12/.

BA81 

8-bit Bayer (https://docs.kernel.org/userspace-api/media/v4l/pixfmt-srggb8.html)

BGBG/GRGR (also BGGR)

GBRG 

GBGB/RGRG.

GRBG 

GRGR/BGBG.

RGGB 

RGRG/GBGB.

RGBA 

32-bit RGBA used for rendering

Member Data Documentation

◆ exposure_time_us

uint32_t auterion::ImageHeader::exposure_time_us {}

exposure time [μs], 0 if unknown

◆ mid_exposure_timestamp

std::optional<rclcpp::Time> auterion::ImageHeader::mid_exposure_timestamp {std::nullopt}

When the image's content was captured: the middle of its exposure, on the clock of timestamp, if the camera tells. timestamp is when the frame was complete; match an image with other sensors, e.g. the vehicle attitude, at this time.

◆ readout_us

int32_t auterion::ImageHeader::readout_us {}

Rolling shutter: from the first row's exposure to the last's [μs], if the camera tells; the middle row is the one at mid_exposure_timestamp. Negative if the image's rows are in the reverse of the sensor's readout order (its last row was exposed first). 0 for a global shutter (all rows exposed together) or if unknown.


The documentation for this struct was generated from the following file: