Banuba SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
libs
types
bnb
types
interfaces
frame_data.hpp
Go to the documentation of this file.
1
/// \file
2
/// \addtogroup Types
3
/// @{
4
///
5
// AUTOGENERATED FILE - DO NOT MODIFY!
6
// This file was generated by Djinni from types.djinni
7
8
#pragma once
9
10
#include <bnb/types/full_image.hpp>
11
#include <bnb/utils/defs.hpp>
12
#include <cstdint>
13
#include <memory>
14
#include <optional>
15
#include <string>
16
#include <unordered_map>
17
#include <vector>
18
19
namespace
bnb {
namespace
interfaces {
20
21
class
frx_recognition_result
;
22
enum class
face_data_source;
23
enum class
face_shape_type;
24
enum class
feature_id
;
25
struct
action_units_data
;
26
struct
brows_mask
;
27
struct
depth_map
;
28
struct
detected_face
;
29
struct
external_face_data
;
30
struct
eyes_mask
;
31
struct
eyes_state
;
32
struct
feature_parameter
;
33
struct
full_image_format
;
34
struct
lips_shine_mask
;
35
struct
transformed_mask_byte
;
36
struct
transformed_mask_gpu
;
37
38
/**
39
* getters throw exceptions when data are not available
40
* android NNs usually output gpu masks
41
*/
42
class
BNB_EXPORT
frame_data
{
43
public
:
44
virtual
~frame_data
() {}
45
46
/** Creates empty `FrameData`. Use `add*` function to fill it. */
47
static
std::shared_ptr<frame_data>
create
();
48
49
virtual
full_image_format
get_full_img_format() = 0;
50
51
virtual
std::vector<float> get_full_img_transform() = 0;
52
53
/** Get frx_recognition_result or null if not exists */
54
virtual
std::shared_ptr<frx_recognition_result>
get_frx_recognition_result
() = 0;
55
56
virtual
void
set_frx_recognition_result(
const
std::shared_ptr<frx_recognition_result> & result) = 0;
57
58
/**
59
* Face detector is an input for face recognizer. It gives only position of
60
* the face. Even if the face is present on the frame it doesn't mean that
61
* face detector can track it.
62
*/
63
virtual
std::vector<detected_face>
get_face_detector_result
() = 0;
64
65
virtual
action_units_data
get_action_units() = 0;
66
67
/** *DEPRECATED*. Use `getFrxRecognitionResult().getFaces()` instead. */
68
virtual
bool
get_is_smile
() = 0;
69
70
/** *DEPRECATED*. Use `getFrxRecognitionResult().getFaces()` instead. */
71
virtual
bool
get_is_mouth_open
() = 0;
72
73
/** *DEPRECATED*. Use `getFrxRecognitionResult().getFaces()` instead. */
74
virtual
bool
get_are_brows_raised
() = 0;
75
76
/** *DEPRECATED*. Use `getFrxRecognitionResult().getFaces()` instead. */
77
virtual
bool
get_are_brows_shifted
() = 0;
78
79
/** *DEPRECATED*. Use `getFrxRecognitionResult().getFaces()` instead. */
80
virtual
bool
get_is_wear_glasses
() = 0;
81
82
virtual
float
get_ruler() = 0;
83
84
/** *DEPRECATED*. Use `getFrxRecognitionResult().getFaces()` instead. */
85
virtual
eyes_state
get_eyes_state
() = 0;
86
87
virtual
float
get_light_correction() = 0;
88
89
virtual
transformed_mask_byte
get_background() = 0;
90
91
virtual
transformed_mask_gpu
get_background_gpu() = 0;
92
93
virtual
transformed_mask_byte
get_hair() = 0;
94
95
virtual
transformed_mask_gpu
get_hair_gpu() = 0;
96
97
virtual
transformed_mask_byte
get_skin() = 0;
98
99
virtual
transformed_mask_gpu
get_skin_gpu() = 0;
100
101
virtual
transformed_mask_byte
get_lips() = 0;
102
103
virtual
transformed_mask_gpu
get_lips_gpu() = 0;
104
105
virtual
transformed_mask_byte
get_teeth() = 0;
106
107
virtual
lips_shine_mask
get_lips_shine() = 0;
108
109
virtual
brows_mask
get_brows() = 0;
110
111
virtual
eyes_mask
get_eyes() = 0;
112
113
virtual
transformed_mask_byte
get_face() = 0;
114
115
virtual
transformed_mask_byte
get_face_skin() = 0;
116
117
virtual
std::optional<std::string> get_face_attributes() = 0;
118
119
virtual
face_shape_type get_face_shape() = 0;
120
121
/** Pupillary distance in mm */
122
virtual
float
get_pupillary_distance
() = 0;
123
124
/**
125
* list[0] and list[1] - x and y coordinates of the thermal temperature of the light source
126
* list[2] - the brightness of the frame
127
*/
128
virtual
std::vector<float>
get_light_source_params
() = 0;
129
130
/** Teeth color in Lab color space */
131
virtual
std::vector<int32_t>
get_teeth_color
() = 0;
132
133
/** Eyeglasses frame color in RGB space */
134
virtual
std::vector<float>
get_glasses_frame_color
() = 0;
135
136
/** Face skin color in RGB space */
137
virtual
std::vector<float>
get_face_skin_color
() = 0;
138
139
virtual
void
add_full_img(
::bnb::full_image_t
img) = 0;
140
141
virtual
void
replace_full_img(
::bnb::full_image_t
img) = 0;
142
143
virtual ::bnb::full_image_t get_full_img() = 0;
144
145
virtual
void
add_background(
const
transformed_mask_byte
& mask) = 0;
146
147
virtual
void
add_external_face_data(face_data_source source,
const
std::vector<external_face_data> & data) = 0;
148
149
virtual
void
add_depth_map(
const
depth_map
&
depth_map
) = 0;
150
151
virtual
void
add_frame_number(int64_t frame_number) = 0;
152
153
virtual
void
add_action_units_data(
const
action_units_data
&
action_units
) = 0;
154
155
/**
156
* Extra parameters during in-CPU feature calculations.
157
* Reference feature documentation.
158
*/
159
virtual
void
add_feature_parameters
(
const
std::unordered_map<
feature_id
, std::vector<feature_parameter>> & params) = 0;
160
161
/**add frame timestamp in microseconds */
162
virtual
void
add_timestamp_us
(
double
timestamp_us) = 0;
163
164
virtual
std::vector<float> get_chromakey_color() = 0;
165
};
166
167
} }
// namespace bnb::interfaces
168
/// @}
169
bnb::full_image_t
basis is the base basis: for y/rgb basis use .basis or get_subchannel_basis_transform(1); for uv basi...
Definition
full_image.hpp:481
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::frame_data::get_teeth_color
virtual std::vector< int32_t > get_teeth_color()=0
Teeth color in Lab color space.
bnb::interfaces::frame_data::create
static std::shared_ptr< frame_data > create()
Creates empty FrameData.
bnb::interfaces::frame_data::add_timestamp_us
virtual void add_timestamp_us(double timestamp_us)=0
add frame timestamp in microseconds
bnb::interfaces::frame_data::get_pupillary_distance
virtual float get_pupillary_distance()=0
Pupillary distance in mm.
bnb::interfaces::frame_data::get_eyes_state
virtual eyes_state get_eyes_state()=0
DEPRECATED.
bnb::interfaces::frame_data::get_frx_recognition_result
virtual std::shared_ptr< frx_recognition_result > get_frx_recognition_result()=0
Get frx_recognition_result or null if not exists.
bnb::interfaces::frame_data::get_face_detector_result
virtual std::vector< detected_face > get_face_detector_result()=0
Face detector is an input for face recognizer.
bnb::interfaces::frame_data::get_is_wear_glasses
virtual bool get_is_wear_glasses()=0
DEPRECATED.
bnb::interfaces::frame_data::get_glasses_frame_color
virtual std::vector< float > get_glasses_frame_color()=0
Eyeglasses frame color in RGB space.
bnb::interfaces::frame_data::add_feature_parameters
virtual void add_feature_parameters(const std::unordered_map< feature_id, std::vector< feature_parameter > > ¶ms)=0
Extra parameters during in-CPU feature calculations.
bnb::interfaces::frame_data::get_are_brows_shifted
virtual bool get_are_brows_shifted()=0
DEPRECATED.
bnb::interfaces::frame_data::get_light_source_params
virtual std::vector< float > get_light_source_params()=0
list[0] and list[1] - x and y coordinates of the thermal temperature of the light source list[2] - th...
bnb::interfaces::frame_data::get_are_brows_raised
virtual bool get_are_brows_raised()=0
DEPRECATED.
bnb::interfaces::frame_data::get_face_skin_color
virtual std::vector< float > get_face_skin_color()=0
Face skin color in RGB space.
bnb::interfaces::frame_data::get_is_mouth_open
virtual bool get_is_mouth_open()=0
DEPRECATED.
bnb::interfaces::frame_data::get_is_smile
virtual bool get_is_smile()=0
DEPRECATED.
bnb::interfaces::frx_recognition_result
Definition
frx_recognition_result.hpp:20
bnb::interfaces::feature_id
feature_id
Definition
feature_id.hpp:14
bnb::interfaces::action_units_data
Definition
action_units_data.hpp:16
bnb::interfaces::action_units
for order of values in action units array see action_units_indices enum
Definition
action_units.hpp:16
bnb::interfaces::brows_mask
Definition
brows_mask.hpp:15
bnb::interfaces::depth_map
Results from depth camera.
Definition
depth_map.hpp:17
bnb::interfaces::detected_face
Definition
detected_face.hpp:15
bnb::interfaces::external_face_data
Holds recognition result from an external source (ARKit, ARCore, etc.).
Definition
external_face_data.hpp:16
bnb::interfaces::eyes_mask
Definition
eyes_mask.hpp:17
bnb::interfaces::eyes_state
Definition
eyes_state.hpp:14
bnb::interfaces::feature_parameter
User configurable parameters for in-CPU calculations during FrameData processing.
Definition
feature_parameter.hpp:19
bnb::interfaces::full_image_format
Definition
full_image_format.hpp:16
bnb::interfaces::lips_shine_mask
Definition
lips_shine_mask.hpp:15
bnb::interfaces::transformed_mask_byte
Definition
transformed_mask_byte.hpp:17
bnb::interfaces::transformed_mask_gpu
Definition
transformed_mask_gpu.hpp:16
Generated by
1.17.0