A frame descriptor for a region-of-interest (ROI) image frame type
typedef struct camera_frame_roi_t { uint32_t height; uint32_t width; uint32_t roi_height; uint32_t roi_width; uint32_t roi_x; uint32_t roi_y; camera_frametype_t type; uint32_t stride[3]; int32_t offset[3]; } camera_frame_roi_t;
Stride is often called pitch. This is an array of 3 stride values to represent the stride to use for each plane of the image. For images with pixel layout of less than 3 planes, the additional stride values can be ignored.
This is an array of 3 offset values to represent the offset to use for each plane of the image. For images with pixel layout of less than 3 planes, the additional offset values can be ignored.
Use this frame descriptor when CAMERA_FRAMETYPE_ROI is reported as the camera_frametype_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. The user 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 camera_frametype_t reported within this structure as this structure can accomodate multiple pixel layouts. See the description for specified camera_frametype_t value to understand the pixel layout for this buffer.