Exposes RealSense frame functionality for C compilers. More...
#include "rs_types.h"
Go to the source code of this file.
Typedefs | |
typedef enum rs2_calib_target_type | rs2_calib_target_type |
Calibration target type. More... | |
typedef enum rs2_frame_metadata_value | rs2_frame_metadata_value |
Per-Frame-Metadata is the set of read-only properties that might be exposed for each individual frame. More... | |
typedef enum rs2_timestamp_domain | rs2_timestamp_domain |
Specifies the clock in relation to which the frame timestamp was measured. More... | |
Exposes RealSense frame functionality for C compilers.
Definition in file rs_frame.h.
typedef enum rs2_calib_target_type rs2_calib_target_type |
Calibration target type.
typedef enum rs2_frame_metadata_value rs2_frame_metadata_value |
Per-Frame-Metadata is the set of read-only properties that might be exposed for each individual frame.
typedef enum rs2_timestamp_domain rs2_timestamp_domain |
Specifies the clock in relation to which the frame timestamp was measured.
Calibration target type.
Definition at line 74 of file rs_frame.h.
Per-Frame-Metadata is the set of read-only properties that might be exposed for each individual frame.
Definition at line 29 of file rs_frame.h.
enum rs2_timestamp_domain |
Specifies the clock in relation to which the frame timestamp was measured.
Definition at line 19 of file rs_frame.h.
rs2_frame* rs2_allocate_composite_frame | ( | rs2_source * | source, |
rs2_frame ** | frames, | ||
int | count, | ||
rs2_error ** | error | ||
) |
Allocate new composite frame, aggregating a set of existing frames
[in] | source | Frame pool to allocate the frame from |
[in] | frames | Array of existing frames |
[in] | count | Number of input frames |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_frame* rs2_allocate_points | ( | rs2_source * | source, |
const rs2_stream_profile * | new_stream, | ||
rs2_frame * | original, | ||
rs2_error ** | error | ||
) |
Allocate new points frame using a frame-source provided from a processing block
[in] | source | Frame pool to allocate the frame from |
[in] | new_stream | New stream profile to assign to newly created frame |
[in] | original | A reference frame that can be used to fill in auxilary information like format, width, height, bpp, stride (if applicable) |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_frame* rs2_allocate_synthetic_motion_frame | ( | rs2_source * | source, |
const rs2_stream_profile * | new_stream, | ||
rs2_frame * | original, | ||
rs2_extension | frame_type, | ||
rs2_error ** | error | ||
) |
Allocate new motion frame using a frame-source provided form a processing block
[in] | source | Frame pool to allocate the frame from |
[in] | new_stream | New stream profile to assign to newly created frame |
[in] | original | A reference frame that can be used to fill in auxilary information like format, width, height, bpp, stride (if applicable) |
[in] | frame_type | New value for frame type for the allocated frame |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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 | ||
) |
Allocate new video frame using a frame-source provided form a processing block
[in] | source | Frame pool to allocate the frame from |
[in] | new_stream | New stream profile to assign to newly created frame |
[in] | original | A reference frame that can be used to fill in auxilary information like format, width, height, bpp, stride (if applicable) |
[in] | new_bpp | New value for bits per pixel for the allocated frame |
[in] | new_width | New value for width for the allocated frame |
[in] | new_height | New value for height for the allocated frame |
[in] | new_stride | New value for stride in bytes for the allocated frame |
[in] | frame_type | New value for frame type for the allocated frame |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
const char* rs2_calib_target_type_to_string | ( | rs2_calib_target_type | type | ) |
void rs2_export_to_ply | ( | const rs2_frame * | frame, |
const char * | fname, | ||
rs2_frame * | texture, | ||
rs2_error ** | error | ||
) |
When called on Points frame type, this method creates a ply file of the model with the given file name.
[in] | frame | Points frame |
[in] | fname | The name for the ply file |
[in] | texture | Texture frame |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Extract frame from within a composite frame
[in] | composite | Composite frame |
[in] | index | Index of the frame to extract within the composite frame |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_extract_target_dimensions | ( | const rs2_frame * | frame, |
rs2_calib_target_type | calib_type, | ||
float * | target_dims, | ||
unsigned int | target_dims_size, | ||
rs2_error ** | error | ||
) |
Extract the target dimensions on the specific target
[in] | frame | Left or right camera frame of specified size based on the target type |
[in] | calib_type | Calibration target type |
[in] | target_dims_size | Target dimension array size |
[out] | target_dims | The array to hold the result target dimensions calculated. For type RS2_CALIB_TARGET_RECT_GAUSSIAN_DOT_VERTICES, the four rectangle side sizes in pixels with the order of top, bottom, left, and right |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
create additional reference to a frame without duplicating frame data
[in] | frame | handle returned from a callback |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
const char* rs2_frame_metadata_to_string | ( | rs2_frame_metadata_value | metadata | ) |
const char* rs2_frame_metadata_value_to_string | ( | rs2_frame_metadata_value | metadata | ) |
retrieve bits per pixels in the frame image (note that bits per pixel is not necessarily divided by 8, as in 12bpp)
[in] | frame | handle returned from a callback |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_metadata_type rs2_get_frame_metadata | ( | const rs2_frame * | frame, |
rs2_frame_metadata_value | frame_metadata, | ||
rs2_error ** | error | ||
) |
retrieve metadata from frame handle
[in] | frame | handle returned from a callback |
[in] | frame_metadata | the rs2_frame_metadata whose latest frame we are interested in |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
retrieve frame number from frame handle
[in] | frame | handle returned from a callback |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_sensor* rs2_get_frame_sensor | ( | const rs2_frame * | frame, |
rs2_error ** | error | ||
) |
const rs2_stream_profile* rs2_get_frame_stream_profile | ( | const rs2_frame * | frame, |
rs2_error ** | error | ||
) |
Returns the stream profile that was used to start the stream of this frame
[in] | frame | frame reference, owned by the user |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
retrieve frame stride in bytes (number of bytes from start of line N to start of line N+1)
[in] | frame | handle returned from a callback |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
When called on Points frame type, this method returns a pointer to an array of texture coordinates per vertex Each coordinate represent a (u,v) pair within [0,1] range, to be mapped to texture image
[in] | frame | Points frame |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_time_t rs2_get_frame_timestamp | ( | const rs2_frame * | frame, |
rs2_error ** | error | ||
) |
rs2_timestamp_domain rs2_get_frame_timestamp_domain | ( | const rs2_frame * | frameset, |
rs2_error ** | error | ||
) |
retrieve timestamp domain from frame handle. timestamps can only be comparable if they are in common domain (for example, depth timestamp might come from system time while color timestamp might come from the device) this method is used to check if two timestamp values are comparable (generated from the same clock)
[in] | frameset | handle returned from a callback |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_vertex* rs2_get_frame_vertices | ( | const rs2_frame * | frame, |
rs2_error ** | error | ||
) |
When called on Points frame type, this method returns a pointer to an array of 3D vertices of the model The coordinate system is: X right, Y up, Z away from the camera. Units: Meters
[in] | frame | Points frame |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
int rs2_is_frame_extendable_to | ( | const rs2_frame * | frame, |
rs2_extension | extension_type, | ||
rs2_error ** | error | ||
) |
Test if the given frame can be extended to the requested extension
[in] | frame | Realsense frame |
[in] | extension_type | The extension to which the frame should be tested if it is extendable |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
communicate to the library you intend to keep the frame alive for a while this will remove the frame from the regular count of the frame pool once this function is called, the SDK can no longer guarantee 0-allocations during frame cycling
[in] | frame | handle returned from a callback |
When called on Pose frame type, this method returns the transformation represented by the pose data
[in] | frame | Pose frame |
[out] | pose | Pointer to a user allocated struct, which contains the pose info after a successful return |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
int rs2_supports_frame_metadata | ( | const rs2_frame * | frame, |
rs2_frame_metadata_value | frame_metadata, | ||
rs2_error ** | error | ||
) |
determine device metadata
[in] | frame | handle returned from a callback |
[in] | frame_metadata | the metadata to check for support |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_synthetic_frame_ready | ( | rs2_source * | source, |
rs2_frame * | frame, | ||
rs2_error ** | error | ||
) |
This method will dispatch frame callback on a frame
[in] | source | Frame pool provided by the processing block |
[in] | frame | Frame to dispatch, frame ownership is passed to this function, so you don't have to call release_frame after it |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
const char* rs2_timestamp_domain_to_string | ( | rs2_timestamp_domain | info | ) |