Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
rs_frame.h
Go to the documentation of this file.
1 /* License: Apache 2.0. See LICENSE file in root directory.
2  Copyright(c) 2017 Intel Corporation. All Rights Reserved. */
3 
10 #ifndef LIBREALSENSE_RS2_FRAME_H
11 #define LIBREALSENSE_RS2_FRAME_H
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 #include "rs_types.h"
17 
20 {
25 const char* rs2_timestamp_domain_to_string(rs2_timestamp_domain info);
26 
29 {
44 const char* rs2_frame_metadata_to_string(rs2_frame_metadata_value metadata);
45 const char* rs2_frame_metadata_value_to_string(rs2_frame_metadata_value metadata);
46 
49 typedef struct rs2_vertex
50 {
51  float xyz[3];
52 } rs2_vertex;
53 
55 typedef struct rs2_pixel
56 {
57  int ij[2];
58 } rs2_pixel;
59 
61 typedef struct rs2_vector
62 {
63  float x, y, z;
64 }rs2_vector;
65 
67 typedef struct rs2_quaternion
68 {
69  float x, y, z, w;
71 
72 typedef struct rs2_pose
73 {
80  unsigned int tracker_confidence;
81  unsigned int mapper_confidence;
82 } rs2_pose;
83 
84 
91 rs2_metadata_type rs2_get_frame_metadata(const rs2_frame* frame, rs2_frame_metadata_value frame_metadata, rs2_error** error);
92 
99 int rs2_supports_frame_metadata(const rs2_frame* frame, rs2_frame_metadata_value frame_metadata, rs2_error** error);
100 
109 rs2_timestamp_domain rs2_get_frame_timestamp_domain(const rs2_frame* frameset, rs2_error** error);
110 
118 
125 unsigned long long rs2_get_frame_number(const rs2_frame* frame, rs2_error** error);
126 
133 const void* rs2_get_frame_data(const rs2_frame* frame, rs2_error** error);
134 
141 int rs2_get_frame_width(const rs2_frame* frame, rs2_error** error);
142 
149 int rs2_get_frame_height(const rs2_frame* frame, rs2_error** error);
150 
157 int rs2_get_frame_stride_in_bytes(const rs2_frame* frame, rs2_error** error);
158 
166 int rs2_get_frame_bits_per_pixel(const rs2_frame* frame, rs2_error** error);
167 
174 void rs2_frame_add_ref(rs2_frame* frame, rs2_error ** error);
175 
181 void rs2_release_frame(rs2_frame* frame);
182 
190 void rs2_keep_frame(rs2_frame* frame);
191 
199 rs2_vertex* rs2_get_frame_vertices(const rs2_frame* frame, rs2_error** error);
200 
208 void rs2_export_to_ply(const rs2_frame* frame, const char* fname, rs2_frame* texture, rs2_error** error);
209 
218 
225 int rs2_get_frame_points_count(const rs2_frame* frame, rs2_error** error);
226 
234 
242 int rs2_is_frame_extendable_to(const rs2_frame* frame, rs2_extension extension_type, rs2_error ** error);
243 
258  int new_bpp, int new_width, int new_height, int new_stride, rs2_extension frame_type, rs2_error** error);
259 
269 rs2_frame* rs2_allocate_composite_frame(rs2_source* source, rs2_frame** frames, int count, rs2_error** error);
270 
280 rs2_frame* rs2_extract_frame(rs2_frame* composite, int index, rs2_error** error);
281 
288 int rs2_embedded_frames_count(rs2_frame* composite, rs2_error** error);
289 
295 void rs2_synthetic_frame_ready(rs2_source* source, rs2_frame* frame, rs2_error** error);
296 
297 
304 void rs2_pose_frame_get_pose_data(const rs2_frame* frame, rs2_pose* pose, rs2_error** error);
305 
306 
307 
308 
309 #ifdef __cplusplus
310 }
311 #endif
312 #endif
void rs2_export_to_ply(const rs2_frame *frame, const char *fname, rs2_frame *texture, rs2_error **error)
Definition: rs_frame.h:33
Definition: rs_frame.h:32
int rs2_get_frame_points_count(const rs2_frame *frame, rs2_error **error)
const rs2_stream_profile * rs2_get_frame_stream_profile(const rs2_frame *frame, rs2_error **error)
rs2_frame * rs2_allocate_composite_frame(rs2_source *source, rs2_frame **frames, int count, rs2_error **error)
rs2_vector angular_acceleration
Definition: rs_frame.h:79
const char * rs2_timestamp_domain_to_string(rs2_timestamp_domain info)
const char * rs2_frame_metadata_to_string(rs2_frame_metadata_value metadata)
float z
Definition: rs_frame.h:63
unsigned int tracker_confidence
Definition: rs_frame.h:80
Definition: rs_frame.h:21
int rs2_is_frame_extendable_to(const rs2_frame *frame, rs2_extension extension_type, rs2_error **error)
Definition: rs_frame.h:40
void rs2_keep_frame(rs2_frame *frame)
rs2_vector translation
Definition: rs_frame.h:74
Definition: api.h:18
rs2_time_t rs2_get_frame_timestamp(const rs2_frame *frame, rs2_error **error)
rs2_pixel * rs2_get_frame_texture_coordinates(const rs2_frame *frame, rs2_error **error)
3D coordinates with origin at topmost left corner of the lense, with positive Z pointing away from th...
Definition: rs_frame.h:49
const char * rs2_frame_metadata_value_to_string(rs2_frame_metadata_value metadata)
int rs2_supports_frame_metadata(const rs2_frame *frame, rs2_frame_metadata_value frame_metadata, rs2_error **error)
rs2_vector angular_velocity
Definition: rs_frame.h:78
struct rs2_quaternion rs2_quaternion
Quaternion used to represent rotation.
int rs2_get_frame_height(const rs2_frame *frame, rs2_error **error)
Definition: rs_frame.h:23
unsigned int mapper_confidence
Definition: rs_frame.h:81
Quaternion used to represent rotation.
Definition: rs_frame.h:67
int rs2_get_frame_stride_in_bytes(const rs2_frame *frame, rs2_error **error)
Definition: rs_frame.h:36
rs2_frame * rs2_allocate_synthetic_video_frame(rs2_source *source, const rs2_stream_profile *new_stream, rs2_frame *original, int new_bpp, int new_width, int new_height, int new_stride, rs2_extension frame_type, rs2_error **error)
Definition: processing.h:12
rs2_vector velocity
Definition: rs_frame.h:75
int rs2_embedded_frames_count(rs2_frame *composite, rs2_error **error)
Definition: rs_frame.h:30
int rs2_get_frame_width(const rs2_frame *frame, rs2_error **error)
Definition: rs_frame.h:42
rs2_timestamp_domain rs2_get_frame_timestamp_domain(const rs2_frame *frameset, rs2_error **error)
Definition: rs_frame.h:72
void rs2_synthetic_frame_ready(rs2_source *source, rs2_frame *frame, rs2_error **error)
rs2_quaternion rotation
Definition: rs_frame.h:77
struct rs2_vertex rs2_vertex
3D coordinates with origin at topmost left corner of the lense, with positive Z pointing away from th...
struct rs2_pose rs2_pose
Definition: rs_frame.h:37
unsigned long long rs2_get_frame_number(const rs2_frame *frame, rs2_error **error)
Definition: rs_frame.h:34
Definition: context.h:35
Definition: rs_frame.h:41
Definition: rs_frame.h:39
Definition: rs_frame.h:31
struct rs2_vector rs2_vector
3D vector in Euclidean coordinate space
3D vector in Euclidean coordinate space
Definition: rs_frame.h:61
rs2_extension
Specifies advanced interfaces (capabilities) objects may implement.
Definition: rs_types.h:93
long long rs2_metadata_type
Definition: rs_types.h:180
rs2_vertex * rs2_get_frame_vertices(const rs2_frame *frame, rs2_error **error)
void rs2_frame_add_ref(rs2_frame *frame, rs2_error **error)
rs2_vector acceleration
Definition: rs_frame.h:76
void rs2_release_frame(rs2_frame *frame)
rs2_frame * rs2_extract_frame(rs2_frame *composite, int index, rs2_error **error)
struct rs2_pixel rs2_pixel
Pixel location within 2D image. (0,0) is the topmost, left corner. Positive X is right, positive Y is down.
rs2_metadata_type rs2_get_frame_metadata(const rs2_frame *frame, rs2_frame_metadata_value frame_metadata, rs2_error **error)
double rs2_time_t
Definition: rs_types.h:179
float xyz[3]
Definition: rs_frame.h:51
Definition: rs_frame.h:38
float z
Definition: rs_frame.h:69
void rs2_pose_frame_get_pose_data(const rs2_frame *frame, rs2_pose *pose, rs2_error **error)
Definition: rs_frame.h:22
int rs2_get_frame_bits_per_pixel(const rs2_frame *frame, rs2_error **error)
rs2_frame_metadata_value
Per-Frame-Metadata are set of read-only properties that might be exposed for each individual frame...
Definition: rs_frame.h:28
struct rs2_frame rs2_frame
Definition: rs_types.h:150
const void * rs2_get_frame_data(const rs2_frame *frame, rs2_error **error)
Pixel location within 2D image. (0,0) is the topmost, left corner. Positive X is right, positive Y is down.
Definition: rs_frame.h:55
rs2_timestamp_domain
Specifies the clock in relation to which the frame timestamp was measured.
Definition: rs_frame.h:19