sensor_format_video_roi_t
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 the buffer to the image of interest, in pixels.
- uint32_t roi_y
- The Y-offset inside the buffer to the image of interest, in pixels.
- sensor_format_t type
- A sensor_format_t value describing the layout of pixels in 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, for a given plane.
Stride is often called pitch.
This array of three values represents 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 array of three values represents 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:
libsensorDescription:
Use this format when SENSOR_FORMAT_VIDEO_ROI is reported as the sensor_format_t.
The width and height fields describe the size of the buffer while roi_width and roi_height describe the size of the region of interest (ROI) inside this buffer. The roi_x and roi_y fields describe the offsets from the beginning of the buffer to the ROI, which we also call the image of interest. You should access only the image of interest within the buffer and ignore the rest of the buffer content.
The layout of the pixels within the buffer depends on the sensor_format_t reported in the type field, because this structure can accommodate multiple pixel layouts.
