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