Class filter

Inheritance Relationships

Base Types

Derived Types

Class Documentation

class filter : public rs2::processing_block, public rs2::filter_interface

Define the filter workflow, inherit this class to generate your own filter. Refer to the viewer class in examples.hpp for a more detailed example.

Subclassed by rs2::align, rs2::colorizer, rs2::decimation_filter, rs2::depth_huffman_decoder, rs2::disparity_transform, rs2::gl::camera_renderer, rs2::gl::pointcloud_renderer, rs2::gl::uploader, rs2::hdr_merge, rs2::hole_filling_filter, rs2::pointcloud, rs2::rates_printer, rs2::save_single_frameset, rs2::save_to_ply, rs2::sequence_id_filter, rs2::spatial_filter, rs2::temporal_filter, rs2::threshold_filter, rs2::units_transform, rs2::y411_decoder, rs2::yuy_decoder

Public Functions

inline virtual rs2::frame process(rs2::frame frame) const override

Ask processing block to process the frame and poll the processed frame from internal queue

Parameters:

on_frame[in] frame to be processed. return processed frame

inline filter(std::shared_ptr<rs2_processing_block> block, int queue_size = 1)

constructor with already created low level processing block assigned.

Parameters:

block[in] - low level rs2_processing_block created before.

template<class S>
inline filter(S processing_function, int queue_size = 1)

constructor with callback function on_frame in rs2_frame_processor_callback structure assigned.

Parameters:

processing_function[in] - function pointer of on_frame function in rs2_frame_processor_callback structure, which will be called back by invoke function .

inline frame_queue get_queue()
inline rs2_processing_block *get() const
template<class T>
inline bool is() const
template<class T>
inline T as() const
inline operator bool() const

Protected Attributes

frame_queue _queue