sensor_format_t

Updated: May 06, 2022

Format of the data in a sensor buffer

Synopsis:

#include <sensor/sensor_api.h>
typedef enum {
    SENSOR_FORMAT_UNSPECIFIED = 0,
    SENSOR_FORMAT_VIDEO_NV12 = 1,
    SENSOR_FORMAT_VIDEO_RGB8888 = 2,
    SENSOR_FORMAT_VIDEO_RGB888 = 3,
    SENSOR_FORMAT_VIDEO_GRAY8 = 5,
    SENSOR_FORMAT_METADATA = 6,
    SENSOR_FORMAT_VIDEO_CBYCRY = 8,
    SENSOR_FORMAT_VIDEO_COMPRESSED = 9,
    SENSOR_FORMAT_VIDEO_RGB565 = 11,
    SENSOR_FORMAT_VIDEO_YCBCR420P = 13,
    SENSOR_FORMAT_VIDEO_YCBYCR = 14,
    SENSOR_FORMAT_VIDEO_YCRYCB = 15,
    SENSOR_FORMAT_VIDEO_CRYCBY = 16,
    SENSOR_FORMAT_VIDEO_ROI = 17,
    SENSOR_FORMAT_VIDEO_BAYER14_RGGB_PADLO16 = 18,
    SENSOR_FORMAT_LIDAR_POLAR = 19,
    SENSOR_FORMAT_LIDAR_POINT_CLOUD = 20,
    SENSOR_FORMAT_USER_DATA = 21,
    SENSOR_FORMAT_RADAR_POLAR = 22,
    SENSOR_FORMAT_GPS = 23,
    SENSOR_FORMAT_IMU = 24,
    SENSOR_FORMAT_LIDAR_SPHERICAL = 25,
    SENSOR_FORMAT_RADAR_SPHERICAL = 26,
    SENSOR_FORMAT_VIDEO_NV16 = 27,
    SENSOR_FORMAT_NUMFORMATS
} sensor_format_t;

Data:

SENSOR_FORMAT_UNSPECIFIED
The data has no associated or recognized format, or is unformatted.
SENSOR_FORMAT_VIDEO_NV12
The format is NV12-formatted video data.

The sensor_format_video_semiplanar_t structure represents this format.

SENSOR_FORMAT_VIDEO_RGB8888
The format is 32-bit ARGB video data.

The sensor_format_video_packed_t structure represents this format.

SENSOR_FORMAT_VIDEO_RGB888
The format is 24-bit RGB video data.

The sensor_format_video_packed_t structure represents this format.

SENSOR_FORMAT_VIDEO_GRAY8
The format is 8-bit gray-scale video data.

The sensor_format_video_packed_t structure represents this format.

SENSOR_FORMAT_METADATA
The format is buffer metadata.

The sensor_format_data_t structure represents this format.

SENSOR_FORMAT_VIDEO_CBYCRY
The format is a YCbCr 4:2:2 packed video frame type.

The sensor_format_video_cbycry_t structure represents this format.

SENSOR_FORMAT_VIDEO_COMPRESSED
The format consists of compressed video data.

The sensor_format_video_compressed_t structure represents this format.

SENSOR_FORMAT_VIDEO_RGB565
The format consists of 16-bit RGB video data (5-bit red component, 6-bit green component, 5-bit blue component).

The sensor_format_video_packed_t structure represents this format.

SENSOR_FORMAT_VIDEO_YCBCR420P
The format is a YCbCr 4:2:0 video format where Y, Cb and Cr are stored in separate planes.

The sensor_format_video_planar_t structure represents this format.

SENSOR_FORMAT_VIDEO_YCBYCR
The format is a YCbCr 4:2:2 packed video frame where the pixel order is Y, Cb, Y, Cr.

The sensor_format_video_packed_t structure represents this format.

SENSOR_FORMAT_VIDEO_YCRYCB
The format is a YCbCr 4:2:2 packed video frame where the pixel order is Y, Cr, Y, Cb.

The sensor_format_video_packed_t structure represents this format.

SENSOR_FORMAT_VIDEO_CRYCBY
The format is a YCbCr 4:2:2 packed video frame where the pixel order is Cr, Y, Cb, Y.

The sensor_format_video_packed_t structure represents this format.

SENSOR_FORMAT_VIDEO_ROI
The format is a region-of-interest (ROI) video image within a bigger buffer.

The sensor_format_video_roi_t structure represents this format.

SENSOR_FORMAT_VIDEO_BAYER14_RGGB_PADLO16
The format is a 14-bit Bayer video data in a 16-bit buffer.
The sensor_format_video_bayer_t structure represents this format. The data is layed out as follows:
 Bit:          FEDCBA9876543210 FEDCBA9876543210
 Scanline n:   RRRRRRRRRRRRRR00 GGGGGGGGGGGGGG00
 Scanline n+1: GGGGGGGGGGGGGG00 BBBBBBBBBBBBBB00
SENSOR_FORMAT_LIDAR_POLAR
The format is lidar data in polar coordinates.

The sensor_lidar_polar_t structure represents this format and the info member will be of type sensor_format_data_t.

SENSOR_FORMAT_LIDAR_POINT_CLOUD
The format is lidar data in point cloud format (X, Y, Z) coordinates.

The cartesian coordinates conform to the right hand rule. The sensor_lidar_point_cloud_t structure represents this format and the info member will be of type sensor_format_data_t.

SENSOR_FORMAT_USER_DATA
The format is a user-specific format used for sensor interim data.

The sensor_format_user_data_t structure represents this format.

SENSOR_FORMAT_RADAR_POLAR
The format is radar data in polar coordinates.

The sensor_radar_track_polar_t structure represents this format and the info member will be of type sensor_format_data_t.

SENSOR_FORMAT_GPS
The format is GPS data.

The sensor_gps_format_t structure represents this format and the info member will be of type sensor_format_data_t.

SENSOR_FORMAT_IMU
The format is IMU data.

The sensor_imu_format_t structure represents this format and the info member will be of type sensor_format_data_t.

SENSOR_FORMAT_LIDAR_SPHERICAL
The format is lidar data in standard spherical coordinates.

This format uses the ISO 80000-2:2009 standard naming convention. The sensor_lidar_spherical_t structure represents this format and the info member will be of type sensor_format_data_t.

SENSOR_FORMAT_RADAR_SPHERICAL
The format is radar track data in standard spherical coordinates.

This format uses the ISO 80000-2:2009 standard naming convention. The sensor_radar_track_spherical_t structure represents this format and the info member will be of type sensor_format_data_t.

SENSOR_FORMAT_VIDEO_NV16
The format type is NV16-formatted data.

The sensor_format_video_semiplanar_t structure represents this frame type.

SENSOR_FORMAT_NUMFORMATS
An end-of-list identifier that indicates the number of formats recognized by this library.

Library:

libsensor

Description:

Formats are used to distinguish between format-specific information within a sensor_buffer_t structure.