Banuba SDK
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 feature_id;
24 struct acne_regions;
25 struct action_units_data;
26 struct brows_mask;
27 struct depth_map;
28 struct external_face_data;
29 struct eyes_mask;
30 struct eyes_state;
31 struct feature_parameter;
32 struct full_image_format;
33 struct lips_shine_mask;
34 struct neuro_beauty_data;
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  virtual action_units_data get_action_units() = 0;
59 
60  virtual acne_regions get_acne_regions() = 0;
61 
62  virtual neuro_beauty_data get_neuro_beauty_data() = 0;
63 
64  virtual bool get_is_smile() = 0;
65 
66  virtual bool get_is_mouth_open() = 0;
67 
68  virtual bool get_is_brows_raised() = 0;
69 
70  virtual bool get_is_brows_shifted() = 0;
71 
72  virtual bool get_is_wear_glasses() = 0;
73 
74  virtual float get_ruler() = 0;
75 
76  virtual eyes_state get_eyes_state() = 0;
77 
78  virtual float get_light_correction() = 0;
79 
80  virtual transformed_mask_byte get_background() = 0;
81 
82  virtual transformed_mask_gpu get_background_gpu() = 0;
83 
84  virtual transformed_mask_byte get_hair() = 0;
85 
86  virtual transformed_mask_gpu get_hair_gpu() = 0;
87 
88  virtual transformed_mask_byte get_skin() = 0;
89 
90  virtual transformed_mask_gpu get_skin_gpu() = 0;
91 
92  virtual transformed_mask_byte get_lips() = 0;
93 
94  virtual transformed_mask_gpu get_lips_gpu() = 0;
95 
96  virtual transformed_mask_byte get_teeth() = 0;
97 
98  virtual transformed_mask_byte get_occlusion() = 0;
99 
100  virtual transformed_mask_byte get_body() = 0;
101 
102  virtual lips_shine_mask get_lips_shine() = 0;
103 
104  virtual brows_mask get_brows() = 0;
105 
106  virtual eyes_mask get_eyes() = 0;
107 
108  virtual transformed_mask_byte get_face() = 0;
109 
110  virtual transformed_mask_byte get_face_skin() = 0;
111 
112  virtual std::optional<std::string> get_face_attributes() = 0;
113 
114  /** Pupillary distance in mm */
115  virtual float get_pupillary_distance() = 0;
116 
117  virtual void add_full_img(::bnb::full_image_t img) = 0;
118 
119  virtual void replace_full_img(::bnb::full_image_t img) = 0;
120 
121  virtual void add_background(const transformed_mask_byte & mask) = 0;
122 
123  virtual void add_external_face_data(face_data_source source, const std::vector<external_face_data> & data) = 0;
124 
125  virtual void add_depth_map(const depth_map & depth_map) = 0;
126 
127  virtual void add_frame_number(int64_t frame_number) = 0;
128 
129  virtual void add_action_units_data(const action_units_data & action_units) = 0;
130 
131  /**
132  * Extra parameters during in-CPU feature calculations.
133  * Reference feature documentation.
134  */
135  virtual void add_feature_parameters(const std::unordered_map<feature_id, std::vector<feature_parameter>> & params) = 0;
136 
137  /**add frame timestamp in microseconds */
138  virtual void add_timestamp_us(double timestamp_us) = 0;
139 };
140 
141 } } // namespace bnb::interfaces
142 /// @}
143 
bnb::interfaces::full_image_format
Definition: full_image_format.hpp:16
bnb::interfaces::neuro_beauty_data
Definition: neuro_beauty_data.hpp:18
bnb::interfaces::action_units
for order of values in action units array see action_units_indices enum
Definition: action_units.hpp:16
bnb::interfaces::acne_regions
Definition: acne_regions.hpp:16
bnb::interfaces::depth_map
Results from depth camera.
Definition: depth_map.hpp:17
bnb::interfaces::transformed_mask_byte
Definition: transformed_mask_byte.hpp:17
bnb::interfaces::eyes_state
Definition: eyes_state.hpp:14
bnb::interfaces::action_units_data
Definition: action_units_data.hpp:16
bnb::interfaces::eyes_mask
Definition: eyes_mask.hpp:17
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::brows_mask
Definition: brows_mask.hpp:15
bnb::interfaces::lips_shine_mask
Definition: lips_shine_mask.hpp:15
bnb::interfaces::transformed_mask_gpu
Definition: transformed_mask_gpu.hpp:16