Banuba SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
libs
recognizer
bnb
recognizer
interfaces
recognizer.hpp
Go to the documentation of this file.
1
/// \file
2
/// \addtogroup Recognizer
3
/// @{
4
///
5
// AUTOGENERATED FILE - DO NOT MODIFY!
6
// This file was generated by Djinni from recognizer.djinni
7
8
#pragma once
9
10
#include "
bnb/types/interfaces/feature_id.hpp
"
11
#include "
bnb/types/interfaces/frame_data.hpp
"
12
#include <bnb/utils/defs.hpp>
13
#include <cstdint>
14
#include <memory>
15
#include <unordered_set>
16
17
namespace
bnb {
namespace
interfaces {
18
19
class
feature
;
20
enum class
recognizer_mode
;
21
22
class
BNB_EXPORT
recognizer
{
23
public
:
24
virtual
~recognizer
() {}
25
26
static
std::shared_ptr<recognizer> create(
recognizer_mode
mode);
27
28
static
int64_t get_feature_id(
::bnb::interfaces::feature_id
feature
);
29
30
virtual
std::shared_ptr<feature> get_feature(
::bnb::interfaces::feature_id
feature
) = 0;
31
32
virtual
void
set_features(
const
std::unordered_set<::bnb::interfaces::feature_id> & features) = 0;
33
34
virtual
void
add_feature(
const
std::shared_ptr<feature> &
feature
,
const
std::unordered_set<::bnb::interfaces::feature_id> & dependencies) = 0;
35
36
virtual
void
remove_feature(
const
std::shared_ptr<feature> &
feature
) = 0;
37
38
/** sets maximum allowed face results, if face tracking feature is present */
39
virtual
void
set_max_faces
(int32_t num) = 0;
40
41
virtual
void
set_offline_mode(
bool
on) = 0;
42
43
/**
44
* Set future frame filtrarion mode.
45
* Produce smoother recognition result (anti jitter), however adds inconsistency in push'ed/pop'ed frames (one frame lag)
46
* Applied only in push_camera_frame/pop_frame_data methods, when offline mode is disabled.
47
* Example: push frame 1 - pop frame 1, push frame 2 - pop frame 1, push frame 3 - pop frame 2, ...
48
*/
49
virtual
void
set_use_future_filter
(
bool
on) = 0;
50
51
/**
52
* Set future frame interpolation mode.
53
* Produce faster recognition result (skip even frames), however adds inconsistency in push'ed/pop'ed frames (one frame lag)
54
* Applied only in push_camera_frame/pop_frame_data methods, when offline mode is disabled.
55
* Example: push frame 1 - pop frame 1, push frame 2 - pop frame 1, push frame 3 - pop frame 2, ...
56
*/
57
virtual
void
set_use_future_interpolate
(
bool
on) = 0;
58
59
/** Enable or disable eyebrows lms processing. */
60
virtual
void
set_enabled_eyebrows_lms_process
(
bool
on) = 0;
61
62
virtual
void
process(
const
std::shared_ptr<::bnb::interfaces::frame_data> &
frame_data
) = 0;
63
64
virtual
void
push_camera_frame(
const
std::shared_ptr<::bnb::interfaces::frame_data> & input_frame_data) = 0;
65
66
virtual
bool
pop_frame_data(
const
std::shared_ptr<::bnb::interfaces::frame_data> & output_frame_data) = 0;
67
68
/** start the recognizer */
69
virtual
void
start
() = 0;
70
71
/** pause the recognizer */
72
virtual
void
pause
() = 0;
73
74
/** pause + clear */
75
virtual
void
stop
() = 0;
76
77
/** clear input and output buffers and pipeline state, also clean cached features */
78
virtual
void
clear
() = 0;
79
};
80
81
} }
// namespace bnb::interfaces
82
/// @}
83
bnb::interfaces::feature
Definition
feature.hpp:18
bnb::interfaces::frame_data
getters throw exceptions when data are not available android NNs usually output gpu masks
Definition
frame_data.hpp:42
bnb::interfaces::recognizer
Definition
recognizer.hpp:22
bnb::interfaces::recognizer::clear
virtual void clear()=0
clear input and output buffers and pipeline state, also clean cached features
bnb::interfaces::recognizer::set_use_future_interpolate
virtual void set_use_future_interpolate(bool on)=0
Set future frame interpolation mode.
bnb::interfaces::recognizer::stop
virtual void stop()=0
pause + clear
bnb::interfaces::recognizer::start
virtual void start()=0
start the recognizer
bnb::interfaces::recognizer::set_use_future_filter
virtual void set_use_future_filter(bool on)=0
Set future frame filtrarion mode.
bnb::interfaces::recognizer::pause
virtual void pause()=0
pause the recognizer
bnb::interfaces::recognizer::set_enabled_eyebrows_lms_process
virtual void set_enabled_eyebrows_lms_process(bool on)=0
Enable or disable eyebrows lms processing.
bnb::interfaces::recognizer::set_max_faces
virtual void set_max_faces(int32_t num)=0
sets maximum allowed face results, if face tracking feature is present
feature_id.hpp
bnb::interfaces::feature_id
feature_id
Definition
feature_id.hpp:14
frame_data.hpp
bnb::interfaces::recognizer_mode
recognizer_mode
Definition
recognizer_mode.hpp:14
Generated by
1.17.0