camera_frametype_t

The frame types identifiers for an image buffer

Synopsis:

#include <camera/camera_api.h>
typedef enum {
    CAMERA_FRAMETYPE_UNSPECIFIED,
    CAMERA_FRAMETYPE_NV12,
    CAMERA_FRAMETYPE_RGB8888,
    CAMERA_FRAMETYPE_RGB888,
    CAMERA_FRAMETYPE_GRAY8,
    CAMERA_FRAMETYPE_BAYER,
    CAMERA_FRAMETYPE_CBYCRY,
    CAMERA_FRAMETYPE_COMPRESSEDVIDEO,
    CAMERA_FRAMETYPE_RGB565,
    CAMERA_FRAMETYPE_YCBCR420P,
    CAMERA_FRAMETYPE_YCBYCR,
    CAMERA_FRAMETYPE_YCRYCB,
    CAMERA_FRAMETYPE_CRYCBY,
    CAMERA_FRAMETYPE_ROI,
    CAMERA_FRAMETYPE_BAYER14_RGGB_PADLO16,
    CAMERA_FRAMETYPE_NV16,
    CAMERA_FRAMETYPE_NV24_Y12,
    CAMERA_FRAMETYPE_BGR8888,
    CAMERA_FRAMETYPE_GRAY10P,
    CAMERA_FRAMETYPE_GRAY12P,
    CAMERA_FRAMETYPE_RGB_IR_8BIT,
    CAMERA_FRAMETYPE_RGB_IR_10BIT,
    CAMERA_FRAMETYPE_NV21,
    CAMERA_FRAMETYPE_NV61,
    CAMERA_FRAMETYPE_YCRCB420P,
    CAMERA_FRAMETYPE_CBYCRY_10BIT,
    CAMERA_FRAMETYPE_BAYER8_RGGB,
    CAMERA_FRAMETYPE_BAYER12_GRBG,
    CAMERA_FRAMETYPE_BAYER10_BGGR_PACKED,
    CAMERA_FRAMETYPE_NUMFRAMETYPES
} camera_frametype_t;

Data:

CAMERA_FRAMETYPE_UNSPECIFIED
The frame type has no associated format, no recognized format, or is unformatted.
CAMERA_FRAMETYPE_NV12
The frame type is NV12 formatted data.

The camera_frame_nv12_t structure represents this frame type.

CAMERA_FRAMETYPE_RGB8888
The frame type is 32-bit RGBA data.

A uint8_t pointer for an RGBA buffer is as follows: buffer[0] = red, buffer[1] = green, buffer[2] = blue, buffer[3] = alpha. The camera_frame_rgb8888_t structure represents this frame type.

CAMERA_FRAMETYPE_RGB888
The frame type is 24-bit RGB data.

A uint8_t pointer for an RGB buffer is as follows: buffer[0] = red, buffer[1] = green, buffer[2] = blue. The camera_frame_rgb888_t structure represents this frame type.

CAMERA_FRAMETYPE_GRAY8
The frame type is 8-bit grayscale image data.

The camera_frame_gray8_t structure represents this frame type.

CAMERA_FRAMETYPE_BAYER
The image is a 10-bit Bayer frame type.

The camera_frame_bayer_t structure represents this frame type.

CAMERA_FRAMETYPE_CBYCRY
The image is a YCbCr 4:2:2 packed frame type.

The camera_frame_cbycry_t structure represents this frame type.

CAMERA_FRAMETYPE_COMPRESSEDVIDEO
The frame consists of compressed video data.
The camera_frame_compressedvideo_t structure represents this frame type.
Note:

This frame type can't be displayed in a window, so you need to set CAMERA_IMGPROP_CREATEWINDOW to 0 when using it.

CAMERA_FRAMETYPE_RGB565
The frame type is 16-bit RGB data (5-bit red component, 6-bit green component, 5-bit blue component).

The camera_frame_rgb565_t structure represents this frame type.

CAMERA_FRAMETYPE_YCBCR420P
The frame type is in YCbCr 4:2:0 format, where Y, Cb, and Cr are stored in separate planes, in that order.

The camera_frame_ycbcr420p_t structure represents this frame type.

CAMERA_FRAMETYPE_YCBYCR
The frame type is in YCbCr 4:2:2 packed format, where the pixel order is Y, Cb, Y, Cr.

The camera_frame_ycbycr_t structure represents this frame type.

CAMERA_FRAMETYPE_YCRYCB
The frame type is in YCbCr 4:2:2 packed format, where the pixel order is Y, Cr, Y, Cb.

The camera_frame_ycrycb_t structure represents this frame type.

CAMERA_FRAMETYPE_CRYCBY
The frame type is in YCbCr 4:2:2 packed format, where the pixel order is Cr, Y, Cb, Y.

The camera_frame_crycby_t structure represents this frame type.

CAMERA_FRAMETYPE_ROI
The frame type is a region-of-interest (ROI) image within a bigger buffer.

The camera_frame_roi_t structure represents this frame type.

CAMERA_FRAMETYPE_BAYER14_RGGB_PADLO16
The frame type is 14-bit Bayer data in a 16-bit buffer.
The camera_frame_bayer_t structure represents this frame type, and it is filled in as follows:
format = CAMERA_BAYERFORMAT_RGGB
packing = 16
bpp = 14
le = false
cadence_length = 16
pixels_per_cadence = 1
justification = CAMERA_BAYERJUSTIFY_LEFT_BIT0LSB,
Bit:          FEDCBA9876543210 FEDCBA9876543210
Scanline n:   RRRRRRRRRRRRRR00 GGGGGGGGGGGGGG00
Scanline n+1: GGGGGGGGGGGGGG00 BBBBBBBBBBBBBB00
CAMERA_FRAMETYPE_NV16
The frame type is NV16 formatted data.

The camera_frame_nv12_t structure represents this frame type.

CAMERA_FRAMETYPE_NV24_Y12
The frame type has NV24 formatted data but with the 12-bit Y plane padded to 16 bits.

The camera_frame_nv12_t structure represents this frame type.

CAMERA_FRAMETYPE_BGR8888
The frame type is 32-bit BGRA data.

A uint8_t pointer for an BGRA buffer is as follows: buffer[0] = blue, buffer[1] = green, buffer[2] = red, buffer[3] = alpha. The camera_frame_rgb8888_t structure represents this frame type.

CAMERA_FRAMETYPE_GRAY10P
The frame type is 10-bit packed grayscale image data without padding.

The camera_frame_gray10p_t structure represents this frame type.

CAMERA_FRAMETYPE_GRAY12P
The frame type is 12-bit packed grayscale image data without padding.

The camera_frame_gray12p_t structure represents this frame type.

CAMERA_FRAMETYPE_RGB_IR_8BIT
The image is an 8-bit RGB-IR frame in which infrared data are mixed with Bayer RGB data in the following pattern:
B    G   R   G   B   G   R   G   ...
G    IR  G   IR  G   IR  G   IR  ...
R    G   B   G   R   G   B   G   ...
G    IR  G   IR  G   IR  G   IR  ...
...  ... ... ... ... ... ... ... ...
The camera_frame_rgb_ir_8bit_t structure represents this frame type.
CAMERA_FRAMETYPE_RGB_IR_10BIT
The image is a 10-bit RGB-IR frame in which infrared data are mixed with Bayer RGB data in the following pattern:
B    G   R   G   B   G   R   G   ...
G    IR  G   IR  G   IR  G   IR  ...
R    G   B   G   R   G   B   G   ...
G    IR  G   IR  G   IR  G   IR  ...
...  ... ... ... ... ... ... ... ...
Each 10-bit pixel sample is zero-padded to 16 bits. The camera_frame_rgb_ir_10bit_t structure represents this frame type.
CAMERA_FRAMETYPE_NV21
The image is an NV21 formatted frame.

The camera_frame_nv21_t structure represents this frame type.

CAMERA_FRAMETYPE_NV61
The image is an NV61 formatted frame.

The camera_frame_nv21_t structure represents this frame type.

CAMERA_FRAMETYPE_YCRCB420P
The frame type is in YCrCb 4:2:0 format where Y, Cr, and Cb are stored in separate planes, in that order.

The camera_frame_ycrcb420p_t structure represents this frame type.

CAMERA_FRAMETYPE_CBYCRY_10BIT
The image is a YCbCr 4:2:2 packed frame with each element comprising 10 bits, where the pixel order is Cb, Y, Cr, Y.

Each 10-bit pixel sample is zero-padded to 16 bit. The camera_frame_cbycry_10bit_t structure represents this frame type.

CAMERA_FRAMETYPE_BAYER8_RGGB
The image is an 8-bit Bayer frame type as per the following pattern:
R   G   R   G   R   G   R   G  ...
G   B   G   B   G   B   G   B  ...
R   G   R   G   R   G   R   G  ...
G   B   G   B   G   B   G   B  ...
... ... ... ... ... ... ... ... ...
The camera_frame_bayer_t structure represents this frame type.
CAMERA_FRAMETYPE_BAYER12_GRBG
The image is an 12-bit Bayer frame type as per the following pattern:
G   R   G   R   G   R   G   R  ...
B   G   B   G   B   G   B   G  ...
G   R   G   R   G   R   G   R  ...
B   G   B   G   B   G   B   G  ...
... ... ... ... ... ... ... ... ...
The camera_frame_bayer_t structure represents this frame type.
CAMERA_FRAMETYPE_BAYER10_BGGR_PACKED
The image is an 10-bit Bayer frame type as per the following pattern:
B   G   B   G   X  ...
G   R   G   R   X  ...
B   G   B   G   X  ...
G   R   G   R   X  ...
... ... ... ... ... ... ... ... ...
In this pattern, X contains the lower 2 bits of each pixel in its row. The camera_frame_bayer_t structure represents this frame type.
CAMERA_FRAMETYPE_NUMFRAMETYPES
An end-of-list identifier that indicates the number of frame types recognized by this library.

Library:

libcamapi

Description:

Frame types are used to distinguish between frame descriptors within a camera_buffer_t structure.

Page updated: