Frame format and metadata.
More...
#include <libfreenect2/frame_listener.hpp>
|
| | Frame (size_t width_arg, size_t height_arg, size_t bytes_per_pixel_arg, unsigned char *data_arg=NULL) |
| | Construct a new frame.
|
| | Frame (size_t width_arg, size_t height_arg, size_t bytes_per_pixel_arg, unsigned char *data_arg, Format format_arg) |
| | Construct a frame with an explicit pixel format.
|
| virtual | ~Frame () |
|
| size_t | width |
| | Length of a line (in pixels).
|
| size_t | height |
| | Number of lines in the frame.
|
| size_t | bytes_per_pixel |
| | Number of bytes in a pixel. If frame format is 'Raw' this is the buffer size.
|
| unsigned char * | data |
| | Data of the frame (aligned).
|
| uint32_t | timestamp |
| | Unit: 0.125 millisecond. Usually incrementing by 266 (30Hz) or 533 (15Hz).
|
| uint64_t | arrival_timestamp_us |
| | Monotonic host time of the first contributing USB transfer, in microseconds.
|
| uint32_t | sequence |
| | Increasing frame sequence number.
|
| float | exposure |
| | From 0.5 (very bright) to ~60.0 (fully covered).
|
| float | gain |
| | From 1.0 (bright) to 1.5 (covered).
|
| float | gamma |
| | From 1.0 (bright) to 6.4 (covered).
|
| uint32_t | status |
| | zero if ok; non-zero for errors.
|
| Format | format |
| | Byte format.
|
Frame format and metadata.
◆ Type
Available types of frames.
| Enumerator |
|---|
| Color | 1920x1080. BGRX or RGBX.
|
| Ir | 512x424 float. Range is [0.0, 65535.0].
|
| Depth | 512x424 float, unit: millimeter. Non-positive, NaN, and infinity are invalid or missing data.
|
◆ Format
Pixel format.
| Enumerator |
|---|
| Invalid | Invalid format.
|
| Raw | Raw bitstream. 'bytes_per_pixel' defines the number of bytes.
|
| Float | A 4-byte float per pixel.
|
| BGRX | 4 bytes of B, G, R, and unused per pixel
|
| RGBX | 4 bytes of R, G, B, and unused per pixel
|
| Gray | 1 byte of gray per pixel
|
◆ Frame() [1/2]
| Frame |
( |
size_t | width_arg, |
|
|
size_t | height_arg, |
|
|
size_t | bytes_per_pixel_arg, |
|
|
unsigned char * | data_arg = NULL ) |
Construct a new frame.
- Parameters
-
| width_arg | Width in pixel |
| height_arg | Height in pixel |
| bytes_per_pixel_arg | Bytes per pixel |
| data_arg | Memory to store frame data. If NULL, new memory is allocated. |
◆ Frame() [2/2]
| Frame |
( |
size_t | width_arg, |
|
|
size_t | height_arg, |
|
|
size_t | bytes_per_pixel_arg, |
|
|
unsigned char * | data_arg, |
|
|
Format | format_arg ) |
Construct a frame with an explicit pixel format.
This overload is intended for callers wrapping externally owned image buffers. Consumers such as Registration validate format and will reject the legacy constructor's default Invalid value.
◆ ~Frame()
◆ width
Length of a line (in pixels).
◆ height
Number of lines in the frame.
◆ bytes_per_pixel
Number of bytes in a pixel. If frame format is 'Raw' this is the buffer size.
◆ data
◆ timestamp
Unit: 0.125 millisecond. Usually incrementing by 266 (30Hz) or 533 (15Hz).
◆ arrival_timestamp_us
| uint64_t arrival_timestamp_us |
Monotonic host time of the first contributing USB transfer, in microseconds.
◆ sequence
Increasing frame sequence number.
◆ exposure
From 0.5 (very bright) to ~60.0 (fully covered).
◆ gain
From 1.0 (bright) to 1.5 (covered).
◆ gamma
From 1.0 (bright) to 6.4 (covered).
◆ status
zero if ok; non-zero for errors.
◆ format
Byte format.
Validated by consumers such as Registration::apply() and the vision helpers; the constructor defaults it to Invalid, so callers wrapping their own buffers must set it explicitly.
◆ rawdata