Exposes RealSense processing-block functionality for C compilers.
More...
#include "rs_types.h"
#include "rs_sensor.h"
#include "rs_option.h"
Go to the source code of this file.
|
rs2_processing_block * | rs2_create_align (rs2_stream align_to, rs2_error **error) |
|
rs2_processing_block * | rs2_create_colorizer (rs2_error **error) |
|
rs2_processing_block * | rs2_create_decimation_filter_block (rs2_error **error) |
|
rs2_processing_block * | rs2_create_disparity_transform_block (unsigned char transform_to_disparity, rs2_error **error) |
|
rs2_frame_queue * | rs2_create_frame_queue (int capacity, rs2_error **error) |
|
rs2_processing_block * | rs2_create_hdr_merge_processing_block (rs2_error **error) |
|
rs2_processing_block * | rs2_create_hole_filling_filter_block (rs2_error **error) |
|
rs2_processing_block * | rs2_create_huffman_depth_decompress_block (rs2_error **error) |
|
rs2_processing_block * | rs2_create_pointcloud (rs2_error **error) |
|
rs2_processing_block * | rs2_create_processing_block (rs2_frame_processor_callback *proc, rs2_error **error) |
|
rs2_processing_block * | rs2_create_processing_block_fptr (rs2_frame_processor_callback_ptr proc, void *context, rs2_error **error) |
|
rs2_processing_block * | rs2_create_rates_printer_block (rs2_error **error) |
|
rs2_processing_block * | rs2_create_sequence_id_filter (rs2_error **error) |
|
rs2_processing_block * | rs2_create_spatial_filter_block (rs2_error **error) |
|
rs2_processing_block * | rs2_create_sync_processing_block (rs2_error **error) |
|
rs2_processing_block * | rs2_create_temporal_filter_block (rs2_error **error) |
|
rs2_processing_block * | rs2_create_threshold (rs2_error **error) |
|
rs2_processing_block * | rs2_create_units_transform (rs2_error **error) |
|
rs2_processing_block * | rs2_create_yuy_decoder (rs2_error **error) |
|
rs2_processing_block * | rs2_create_zero_order_invalidation_block (rs2_error **error) |
|
void | rs2_delete_frame_queue (rs2_frame_queue *queue) |
|
void | rs2_delete_processing_block (rs2_processing_block *block) |
|
void | rs2_enqueue_frame (rs2_frame *frame, void *queue) |
|
const char * | rs2_get_processing_block_info (const rs2_processing_block *block, rs2_camera_info info, rs2_error **error) |
|
int | rs2_is_processing_block_extendable_to (const rs2_processing_block *block, rs2_extension extension_type, rs2_error **error) |
|
int | rs2_poll_for_frame (rs2_frame_queue *queue, rs2_frame **output_frame, rs2_error **error) |
|
void | rs2_process_frame (rs2_processing_block *block, rs2_frame *frame, rs2_error **error) |
|
int | rs2_processing_block_register_simple_option (rs2_processing_block *block, rs2_option option_id, float min, float max, float step, float def, rs2_error **error) |
|
void | rs2_start_processing (rs2_processing_block *block, rs2_frame_callback *on_frame, rs2_error **error) |
|
void | rs2_start_processing_fptr (rs2_processing_block *block, rs2_frame_callback_ptr on_frame, void *user, rs2_error **error) |
|
void | rs2_start_processing_queue (rs2_processing_block *block, rs2_frame_queue *queue, rs2_error **error) |
|
int | rs2_supports_processing_block_info (const rs2_processing_block *block, rs2_camera_info info, rs2_error **error) |
|
int | rs2_try_wait_for_frame (rs2_frame_queue *queue, unsigned int timeout_ms, rs2_frame **output_frame, rs2_error **error) |
|
rs2_frame * | rs2_wait_for_frame (rs2_frame_queue *queue, unsigned int timeout_ms, rs2_error **error) |
|
Exposes RealSense processing-block functionality for C compilers.
Definition in file rs_processing.h.
Creates Align processing block.
- Parameters
-
[in] | align_to | stream type to be used as the target of frameset alignment |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Definition at line 2211 of file rs.cpp.
Creates Depth-Colorizer processing block that can be used to quickly visualize the depth data This block will accept depth frames as input and replace them by depth frames with format RGB8 Non-depth frames are passed through Further customization will be added soon (format, color-map, histogram equalization control)
- Parameters
-
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Definition at line 2221 of file rs.cpp.
Creates Depth post-processing filter block. This block accepts depth frames, applies decimation filter and plots modified prames Note that due to the modifiedframe size, the decimated frame repaces the original one
- Parameters
-
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Definition at line 2232 of file rs.cpp.
Creates a post processing block that provides for depth<->disparity domain transformation for stereo-based depth modules
- Parameters
-
[in] | transform_to_disparity | flag select the transform direction: true = depth->disparity, and vice versa |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Definition at line 2256 of file rs.cpp.
create frame queue. frame queues are the simplest x-platform synchronization primitive provided by librealsense to help developers who are not using async APIs
- Parameters
-
[in] | capacity | max number of frames to allow to be stored in the queue before older frames will start to get dropped |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
- Returns
- handle to the frame queue, must be released using rs2_delete_frame_queue
Definition at line 1030 of file rs.cpp.
Creates a hdr_merge processing block. The block merges between two depth frames with different exposure values
- Parameters
-
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Definition at line 2296 of file rs.cpp.
Creates Depth post-processing hole filling block. The filter replaces empty pixels with data from adjacent pixels based on the method selected
- Parameters
-
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Definition at line 2264 of file rs.cpp.
Creates Depth frame decompression module. Decoded frames compressed and transmitted with Z16H variable-lenght Huffman code to standartized Z16 Depth data format. Using the compression allows to reduce the Depth frames bandwidth by more than 50 percent
- Parameters
-
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
- Returns
- Huffman-code decompression processing block
Definition at line 2288 of file rs.cpp.
Creates Point-Cloud processing block. This block accepts depth frames and outputs Points frames In addition, given non-depth frame, the block will align texture coordinate to the non-depth stream
- Parameters
-
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Definition at line 2187 of file rs.cpp.
This method creates new custom processing block. This lets the users pass frames between module boundaries for processing This is an infrastructure function aimed at middleware developers, and also used by provided blocks such as sync, colorizer, etc..
- Parameters
-
| proc | Processing function to be applied to every frame entering the block |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
- Returns
- new processing block, to be released by rs2_delete_processing_block
Definition at line 2023 of file rs.cpp.
This method creates new custom processing block from function pointer. This lets the users pass frames between module boundaries for processing This is an infrastructure function aimed at middleware developers, and also used by provided blocks such as sync, colorizer, etc..
- Parameters
-
| proc | Processing function pointer to be applied to every frame entering the block |
| context | User context (can be anything or null) to be passed later as ctx param of the callback |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
- Returns
- new processing block, to be released by rs2_delete_processing_block
Definition at line 2032 of file rs.cpp.
Creates a rates printer block. The printer prints the actual FPS of the invoked frame stream. The block ignores reapiting frames and calculats the FPS only if the frame number of the relevant frame was changed.
- Parameters
-
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Definition at line 2272 of file rs.cpp.
Creates a sequence_id_filter processing block. The block lets frames with the selected sequence id pass and blocks frames with other values
- Parameters
-
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Definition at line 2304 of file rs.cpp.
Creates Depth post-processing spatial filter block. This block accepts depth frames, applies spatial filters and plots modified prames
- Parameters
-
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Definition at line 2248 of file rs.cpp.
Creates Sync processing block. This block accepts arbitrary frames and output composite frames of best matches Some frames may be released within the syncer if they are waiting for match for too long Syncronization is done (mostly) based on timestamps so good hardware timestamps are a pre-condition
- Parameters
-
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Definition at line 2062 of file rs.cpp.
Creates Depth post-processing filter block. This block accepts depth frames, applies temporal filter
- Parameters
-
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Definition at line 2240 of file rs.cpp.
Creates depth thresholding processing block By controlling min and max options on the block, one could filter out depth values that are either too large or too small, as a software post-processing step
- Parameters
-
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Definition at line 2199 of file rs.cpp.
Creates depth units transformation processing block All of the pixels are transformed from depth units into meters.
- Parameters
-
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Definition at line 2205 of file rs.cpp.
Creates YUY decoder processing block. This block accepts raw YUY frames and outputs frames of other formats. YUY is a common video format used by a variety of web-cams. It benefits from packing pixels into 2 bytes per pixel without signficant quality drop. YUY representation can be converted back to more usable RGB form, but this requires somewhat costly conversion. The SDK will automatically try to use SSE2 and AVX instructions and CUDA where available to get best performance. Other implementations (using GLSL, OpenCL, Neon and NCS) should follow.
- Parameters
-
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Definition at line 2193 of file rs.cpp.
Creates Depth post-processing zero order fix block. The filter invalidates pixels that has a wrong value due to zero order effect
- Parameters
-
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
- Returns
- zero order fix processing block
Definition at line 2280 of file rs.cpp.
deletes frame queue and releases all frames inside it
- Parameters
-
Definition at line 1036 of file rs.cpp.
Deletes the processing block
- Parameters
-
[in] | block | Processing block |
Definition at line 2106 of file rs.cpp.
enqueue new frame into a queue
- Parameters
-
[in] | frame | frame handle to enqueue (this operation passed ownership to the queue) |
[in] | queue | the frame queue data structure |
Definition at line 1092 of file rs.cpp.
Retrieve processing block specific information, like name.
- Parameters
-
[in] | block | The processing block |
[in] | info | processing block info type to retrieve |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
- Returns
- The requested processing block info string, in a format specific to the device model
Definition at line 2795 of file rs.cpp.
Test if the given processing block can be extended to the requested extension
- Parameters
-
[in] | block | processing block |
[in] | extension | The extension to which the sensor should be tested if it is extendable |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
- Returns
- non-zero value iff the processing block can be extended to the given extension
Definition at line 1481 of file rs.cpp.
poll if a new frame is available and dequeue if it is
- Parameters
-
[in] | queue | the frame queue data structure |
[out] | output_frame | frame handle to be released using rs2_release_frame |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
- Returns
- true if new frame was stored to output_frame
Definition at line 1058 of file rs.cpp.
This method is used to pass frame into a processing block
- Parameters
-
[in] | block | Processing block |
[in] | frame | Frame to process, ownership is moved to the block object |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Definition at line 2097 of file rs.cpp.
This method adds a custom option to a custom processing block. This is a simple float that can be accessed via rs2_set_option and rs2_get_option This is an infrastructure function aimed at middleware developers, and also used by provided blocks such as save_to_ply, etc..
- Parameters
-
[in] | block | Processing block |
[in] | option_id | an int ID for referencing the option |
[in] | min | the minimum value which will be accepted for this option |
[in] | max | the maximum value which will be accepted for this option |
[in] | step | the granularity of options which accept discrete values, or zero if the option accepts continuous values |
[in] | def | the default value of the option. This will be the initial value. |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
- Returns
- true if adding the option succeeds. false if it fails e.g. an option with this id is already registered
Definition at line 2046 of file rs.cpp.
This method is used to direct the output from the processing block to some callback or sink object
- Parameters
-
[in] | block | Processing block |
[in] | on_frame | Callback to be invoked every time the processing block calls frame_ready |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Definition at line 2070 of file rs.cpp.
This method is used to direct the output from the processing block to some callback or sink object
- Parameters
-
[in] | block | Processing block |
[in] | on_frame | Callback function to be invoked every time the processing block calls frame_ready |
[in] | user | User context for the callback (can be anything or null) |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Definition at line 2078 of file rs.cpp.
This method is used to direct the output from the processing block to a dedicated queue object
- Parameters
-
[in] | block | Processing block |
[in] | queue | Queue to place the processed frames to |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Definition at line 2087 of file rs.cpp.
Check if a processing block supports a specific info type.
- Parameters
-
[in] | block | The processing block to check |
[in] | info | The parameter to check for support |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
- Returns
- True if the parameter both exist and well-defined for the specific device
Definition at line 2807 of file rs.cpp.
wait until new frame becomes available in the queue and dequeue it
- Parameters
-
[in] | queue | the frame queue data structure |
[in] | timeout_ms | max time in milliseconds to wait until a frame becomes available |
[out] | output_frame | frame handle to be released using rs2_release_frame |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
- Returns
- true if new frame was stored to output_frame
Definition at line 1075 of file rs.cpp.
wait until new frame becomes available in the queue and dequeue it
- Parameters
-
[in] | queue | the frame queue data structure |
[in] | timeout_ms | max time in milliseconds to wait until an exception will be thrown |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
- Returns
- frame handle to be released using rs2_release_frame
Definition at line 1043 of file rs.cpp.