libfreenect2: Frame Class Reference
Frame format and metadata. More...
#include <libfreenect2/frame_listener.hpp>
Public Types | |
| enum | Type { Color = 1, Ir = 2, Depth = 4 } |
| Available types of frames. More... | |
| enum | Format { Invalid = 0, Raw = 1, Float = 2, BGRX = 4, RGBX = 5, Gray = 6 } |
| Pixel format. More... | |
Public Member Functions | |
| Frame (size_t width, size_t height, size_t bytes_per_pixel, unsigned char *data_=NULL) | |
| Construct a new frame. More... | |
| virtual | ~Frame () |
Public Attributes | |
| size_t | width |
| Length of a line (in pixels). More... | |
| size_t | height |
| Number of lines in the frame. More... | |
| size_t | bytes_per_pixel |
| Number of bytes in a pixel. If frame format is 'Raw' this is the buffer size. More... | |
| unsigned char * | data |
| Data of the frame (aligned). More... | |
| uint32_t | timestamp |
| Unit: roughly or exactly 0.1 millisecond. More... | |
| uint32_t | sequence |
| Increasing frame sequence number. More... | |
| float | exposure |
| From 0.5 (very bright) to ~60.0 (fully covered) More... | |
| float | gain |
| From 1.0 (bright) to 1.5 (covered) More... | |
| float | gamma |
| From 1.0 (bright) to 6.4 (covered) More... | |
| uint32_t | status |
| zero if ok; non-zero for errors. More... | |
| Format | format |
| Byte format. Informative only, doesn't indicate errors. More... | |
Protected Attributes | |
| unsigned char * | rawdata |
| Unaligned start of data. More... | |
Frame format and metadata.
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. |
Pixel format.
| Frame | ( | size_t | width, |
| size_t | height, | ||
| size_t | bytes_per_pixel, | ||
| unsigned char * | data_ = NULL |
||
| ) |
Construct a new frame.
- Parameters
-
width Width in pixel height Height in pixel bytes_per_pixel Bytes per pixel data_ Memory to store frame data. If NULL, new memory is allocated.
|
virtual |
Length of a line (in pixels).
Number of lines in the frame.
Number of bytes in a pixel. If frame format is 'Raw' this is the buffer size.
Unit: roughly or exactly 0.1 millisecond.
Increasing frame sequence number.
From 0.5 (very bright) to ~60.0 (fully covered)
From 1.0 (bright) to 1.5 (covered)
From 1.0 (bright) to 6.4 (covered)
zero if ok; non-zero for errors.
Byte format. Informative only, doesn't indicate errors.