sensor_format_video_roi_t

A format for a region-of-interest (ROI) video data

Synopsis:

#include <sensor/sensor_api.h>
typedef struct sensor_format_video_roi_t {
    uint32_t height;
    uint32_t width;
    uint32_t roi_height;
    uint32_t roi_width;
    uint32_t roi_x;
    uint32_t roi_y;
    sensor_format_t type;
    uint32_t stride[3];
    int32_t offset[3];
} sensor_format_video_roi_t;

Data:

uint32_t height
The height of the buffer, in pixels.
uint32_t width
The width of the buffer, in pixels.
uint32_t roi_height
The height of the image of interest, in pixels.
uint32_t roi_width
The width of the image of interest, in pixels.
uint32_t roi_x
The X-offset inside of the buffer to the image of interest, in pixels.
uint32_t roi_y
The Y-offset inside of the buffer to the image of interest, in pixels.
sensor_format_t type
The type describing the layout of pixels within this buffer.
uint32_t stride[3]
The number of bytes between the first pixel of a given row in memory and the first pixel of the next row in memory of a given plane.

Stride often refers to the pitch. This is an array of three stride values to represent the stride to use for each plane of the image. For images with pixel layout of less than three planes, the additional stride values can be ignored.

int32_t offset[3]
The number of bytes between the first pixel of the buffer in memory and the first pixel of a given plane in memory.

This is an array of three offset values to represent the offset to use for each plane of the image. For images with pixel layout of less than three planes, the additional offset values can be ignored.

Library:

libsensor

Description:

Use this format when SENSOR_FORMAT_VIDEO_ROI is reported as the sensor_format_t.

The width and height of this structure describe the size of the buffer while the ROI width and height describe the size of the image of interest inside this bigger buffer. The ROI X and Y values describe the offset from the beginning of the buffer to find the image of interest. You should access only the ROI within this buffer and ignore the rest of the buffer content.

The layout of the pixels within this buffer depends on the sensor_format_t reported within this structure because this structure can accomodate multiple pixel layouts.