Banuba SDK
Public Member Functions | Static Public Member Functions | List of all members
bnb::interfaces::recognizer Class Referenceabstract

Public Member Functions

virtual std::shared_ptr< featureget_feature (feature_id feature)=0
 
virtual void set_features (const std::unordered_set< feature_id > &features)=0
 
virtual void add_feature (const std::shared_ptr< feature > &feature, const std::unordered_set< feature_id > &dependencies, bool needs_gpu)=0
 
virtual void remove_feature (const std::shared_ptr< feature > &feature)=0
 
virtual void set_max_faces (int32_t num)=0
 sets maximum allowed face results, if face tracking feature is present
 
virtual void set_offline_mode (bool on)=0
 
virtual void set_nn_enable (bool enable)=0
 Set flag which enable NN's features. More...
 
virtual bool get_nn_enable () const =0
 
virtual bool is_device_nn_compatible ()=0
 Check if device compatible with NN player.
 
virtual void set_face_search_mode (face_search_mode mode)=0
 Clear pipeline state and set face search mode.
 
virtual void process (const std::shared_ptr<::bnb::interfaces::frame_data > &frame_data)=0
 
virtual void push_camera_frame (const std::shared_ptr<::bnb::interfaces::frame_data > &input_frame_data)=0
 
virtual bool pop_frame_data (const std::shared_ptr<::bnb::interfaces::frame_data > &output_frame_data)=0
 
virtual void start ()=0
 start the recognizer
 
virtual void pause ()=0
 pause the recognizer
 
virtual void stop ()=0
 pause + clear
 
virtual void clear ()=0
 clear input and output buffers and pipeline state, also clean cached features
 

Static Public Member Functions

static std::shared_ptr< recognizercreate (recognizer_mode mode, std::optional< int32_t > max_tokens)
 
static int64_t get_feature_id (feature_id feature)
 

Detailed Description

Definition at line 24 of file recognizer.hpp.

Member Function Documentation

◆ create()

static std::shared_ptr<recognizer> bnb::interfaces::recognizer::create ( recognizer_mode  mode,
std::optional< int32_t >  max_tokens 
)
static
Parameters
max_tokensIf greater than 0: recognizer will run processing on push-ed() frame only if it can "consume" a token - and will wait for the token to become available if all max_tokens tokens have been used up. Consumed tokens are "produced" again one-by-one when pop-ping() processed frame(s). This mode prevents processing frames more often than a consumer(e.g. renderer) can use: potentially reducing energy consumption at the cost of higher latency. Only for asynchronous mode.

◆ set_nn_enable()

virtual void bnb::interfaces::recognizer::set_nn_enable ( bool  enable)
pure virtual

Set flag which enable NN's features.

True by default, if device compatible with NN player When this flag is false, recognizer will skip NN-dependent features during set_features call. In case when device have no NN player support (is_device_nn_compatible return false), setting enable to true have no any effect


The documentation for this class was generated from the following file: