Banuba SDK
|
Classes | |
struct | bnb::interfaces::acne_regions |
struct | bnb::interfaces::action_units |
for order of values in action units array see action_units_indices enum More... | |
struct | bnb::interfaces::action_units_data |
struct | bnb::interfaces::brows_mask |
struct | bnb::interfaces::camera_position |
struct | bnb::interfaces::depth_map |
Results from depth camera. More... | |
struct | bnb::interfaces::external_face_data |
Holds recognition result from an external source (ARKit, ARCore, etc.) More... | |
struct | bnb::interfaces::eyes_corneosclera_mask |
struct | bnb::interfaces::eyes_iris_mask |
struct | bnb::interfaces::eyes_mask |
struct | bnb::interfaces::eyes_pupil_mask |
struct | bnb::interfaces::eyes_state |
class | bnb::interfaces::face_data |
struct | bnb::interfaces::feature_parameter |
User configurable parameters for in-CPU calculations during FrameData processing. More... | |
class | bnb::interfaces::frame_data |
getters throw exceptions when data are not available android NNs usually output gpu masks More... | |
class | bnb::interfaces::frx_recognition_result |
struct | bnb::interfaces::full_image_format |
struct | bnb::interfaces::lips_shine_mask |
struct | bnb::interfaces::pixel_buffer |
struct | bnb::interfaces::pixel_rect |
struct | bnb::interfaces::point2d |
struct | bnb::interfaces::size |
struct | bnb::interfaces::touch |
User touch object. More... | |
struct | bnb::interfaces::transformable_event |
class | bnb::interfaces::transformation |
struct | bnb::interfaces::transformed_mask |
struct | bnb::interfaces::transformed_mask_byte |
struct | bnb::interfaces::transformed_mask_float |
struct | bnb::interfaces::transformed_mask_gpu |
struct | bnb::image_format |
A structure stores format information about image. More... | |
class | bnb::base_image_t |
A base class for *_image_t classes. More... | |
class | bnb::bpc8_image_t |
A class for representing bpc8 images as C++ object. More... | |
struct | bnb::yuv_format_t |
Struture stores all information about yuv format. More... | |
class | bnb::yuv_image_t |
Clas represents yuv image as C++ object. More... | |
class | bnb::full_image_t |
basis is the base basis: for y/rgb basis use .basis or get_subchannel_basis_transform(1); for uv basis use get_subchannel_basis_transform(2); More... | |
union | bnb::point2d |
union | bnb::point3d |
struct | bnb::size |
struct | bnb::data_t |
class | bnb::transformation |
This class implements affine or perspective 2d transformations Standard usage implies transformation from common basis into other(common, image or standard) basis (e.g. More... | |
struct | bnb::transformation::affine_coeffs_t |
struct | bnb::transformable_event< T > |
struct | bnb::pixel_rect |
Typedefs | |
using | bnb::high_res_timer = std::chrono::high_resolution_clock |
using | bnb::time_stamp_t = std::chrono::time_point<std::chrono::high_resolution_clock> |
using | bnb::orientation = camera_orientation |
using | bnb::color_plane_data_t = std::uint8_t |
using | bnb::color_plane = std::shared_ptr<color_plane_data_t> |
Enumerations | |
enum class | bnb::pixel_buffer_format : int32_t { bpc8_rgb = 0x0101 , bpc8_bgr = 0x0102 , bpc8_rgba = 0x0103 , bpc8_bgra = 0x0104 , bpc8_argb = 0x0105 , nv12 = 0x0201 , i420 = 0x0401 } |
bt601 and bt709 - two standards for representing color space that use the same image encoding/decoding algorithm. More... | |
enum class | bnb::color_range { video , color_range::full } |
Enum class represents color range. More... | |
enum class | bnb::color_std { bt601 , bt709 } |
Enum class represents suppotred color standarts. More... | |
enum class | bnb::yuv_format { yuv_nv12 , yuv_i420 } |
Enum class represents supported yuv formats. More... | |
enum class | bnb::camera_orientation : unsigned int { deg_0 = 0 , deg_90 = 1 , deg_180 = 2 , deg_270 = 3 , up = deg_0 , left = deg_90 , down = deg_180 , right = deg_270 } |
camera image layout is top-left, 0 orientation is portrait, rotation is counterclockwise More... | |
enum class | bnb::rect_fit_mode : uint8_t { rect_fit_mode::fit_width , rect_fit_mode::fit_height , rect_fit_mode::fit_inside , rect_fit_mode::fit_outside } |
Functions | |
bool | bnb::pixel_buffer_format_is_bpc8 (pixel_buffer_format format) |
bool | bnb::pixel_buffer_format_is_nv12 (pixel_buffer_format format) |
bool | bnb::pixel_buffer_format_is_i420 (pixel_buffer_format format) |
bool | bnb::pixel_buffer_format_is_yuv (pixel_buffer_format format) |
std::string_view | bnb::pixel_buffer_format_to_str (pixel_buffer_format format) |
color_plane | bnb::color_plane_vector (std::vector< color_plane_data_t > vector) |
color_plane | bnb::color_plane_string (std::string str) |
color_plane | bnb::color_plane_char_arr (const char *ptr, size_t size) |
color_plane | bnb::color_plane_weak (const color_plane_data_t *ptr) |
color_plane | bnb::color_plane_data (data_t &&data) |
void | bnb::fit_rects_aspect_ratio (pixel_rect &source_rect, pixel_rect &target_rect, rect_fit_mode mode=rect_fit_mode::fit_inside) |
Adjust rects to have the same aspect ratio as if fitting source_rect into target_rect according to mode, return source_rect, target_rect have the same (+-rounding) aspect ratio, and are always not exceeding corresponding input rect, preserving original centers. | |
void | bnb::fill_exterior (uint8_t *pixels, uint32_t width, uint32_t height, uint32_t channels, pixel_rect rect, uint8_t color, bool edge_repeat=false) |
void | bnb::transform (const uint8_t *src, uint32_t src_w, uint32_t src_h, uint8_t *dst, uint32_t dst_w, uint32_t dst_h, uint32_t channels, const transformation &t) |
Transform src image to dst. | |
void | bnb::transform (const float *src, uint32_t src_w, uint32_t src_h, float *dst, uint32_t dst_w, uint32_t dst_h, uint32_t channels, const transformation &t) |
Transform src image to dst. | |
void | bnb::transform (const uint8_t *src, uint32_t src_w, uint32_t src_h, uint8_t *dst, uint32_t dst_w, uint32_t dst_h, uint32_t channels, const transformation &from, const transformation &to) |
Transform src image to dst through common basis NOTE: both transformations should be (common -> image) | |
void | bnb::transform1x1 (const uint8_t *src, uint8_t *dst, uint32_t w, uint32_t h, uint32_t channels, const transformation &t) |
Transform src image to dst param src, dst source, destination image buffers param w, h source, destination width and height param channels number of channels per pixel param t transformation (src -> dst) to apply. | |
point2d | bnb::transform (const point2d &point, const transformation &t) |
Apply transformation to point. | |
point2d | bnb::transform (const point2d &point, const transformation &from, const transformation &to) |
Transform point through common basis Apply transformation to point from some basis to another one through common basis NOTE: both transformations should be (common -> image) param point 2D point to transform param from,to transformations (common -> image) to apply by formula (from -> common -> to) return result 2D point. | |
pixel_rect | bnb::transform (const pixel_rect &rect, const transformation &t) |
Apply transformation to rect Result is normalized wrt. | |
bool | bnb::pixel_rect::is_valid () const |
void | bnb::pixel_rect::transpose () |
pixel_rect | bnb::pixel_rect::intersect (const pixel_rect &rect) const |
bool | bnb::pixel_rect::operator== (const pixel_rect &cmp) const noexcept |
bool | bnb::pixel_rect::operator!= (const pixel_rect &cmp) const noexcept |
bnb::pixel_rect::pixel_rect (int32_t _x, int32_t _y, int32_t _w, int32_t _h) | |
bnb::pixel_rect::pixel_rect (int32_t _w, int32_t _h) | |
bnb::pixel_rect::pixel_rect (const interfaces::pixel_rect &rect) | |
interfaces::pixel_rect | bnb::pixel_rect::get_iface () const |
bnb::pixel_rect::operator interfaces::pixel_rect () const | |
template<typename T > | |
const T & | bnb::full_image_t::get_data () const noexcept |
template<typename T > | |
bool | bnb::full_image_t::has_data () const noexcept |
interfaces::point2d | bnb::transformation::transform_point (const interfaces::point2d &p) const override |
Apply transform to point. | |
interfaces::pixel_rect | bnb::transformation::transform_rect (const interfaces::pixel_rect &rect) const override |
Variables | |
int32_t | bnb::pixel_rect::x = 0 |
int32_t | bnb::pixel_rect::y = 0 |
int32_t | bnb::pixel_rect::w = 0 |
int32_t | bnb::pixel_rect::h = 0 |
using bnb::color_plane = std::shared_ptr<color_plane_data_t> |
Definition at line 219 of file base_types.hpp.
using bnb::color_plane_data_t = std::uint8_t |
Definition at line 218 of file base_types.hpp.
using bnb::high_res_timer = std::chrono::high_resolution_clock |
Definition at line 37 of file base_types.hpp.
using bnb::orientation = camera_orientation |
Definition at line 40 of file base_types.hpp.
using bnb::time_stamp_t = std::chrono::time_point<std::chrono::high_resolution_clock> |
Definition at line 38 of file base_types.hpp.
|
strong |
camera image layout is top-left, 0 orientation is portrait, rotation is counterclockwise
Definition at line 26 of file base_types.hpp.
|
strong |
Enum class represents color range.
Enumerator | |
---|---|
full | for y values range is 16-235, for u and v values range is 16-240 |
Definition at line 239 of file full_image.hpp.
|
strong |
Enum class represents suppotred color standarts.
Definition at line 249 of file full_image.hpp.
|
strong |
bt601 and bt709 - two standards for representing color space that use the same image encoding/decoding algorithm.
Differ in the encoding / decoding coefficients.
Definition at line 28 of file full_image.hpp.
|
strong |
Definition at line 22 of file transformation.hpp.
|
strong |
Enum class represents supported yuv formats.
Definition at line 259 of file full_image.hpp.
|
inline |
Definition at line 236 of file base_types.hpp.
|
inline |
Definition at line 249 of file base_types.hpp.
|
inline |
Definition at line 230 of file base_types.hpp.
|
inline |
Definition at line 221 of file base_types.hpp.
|
inline |
Definition at line 243 of file base_types.hpp.
void bnb::fit_rects_aspect_ratio | ( | pixel_rect & | source_rect, |
pixel_rect & | target_rect, | ||
rect_fit_mode | mode = rect_fit_mode::fit_inside ) |
Adjust rects to have the same aspect ratio as if fitting source_rect into target_rect according to mode, return source_rect, target_rect have the same (+-rounding) aspect ratio, and are always not exceeding corresponding input rect, preserving original centers.
May do some per-axis scale adjustments within small margin for fast, integral and/or pixel-perfect scaling between pixel rects
|
inlinenoexcept |
Definition at line 716 of file full_image.hpp.
|
inline |
Definition at line 84 of file pixel_rect.hpp.
|
inlinenoexcept |
Definition at line 724 of file full_image.hpp.
|
inline |
Definition at line 30 of file pixel_rect.hpp.
|
inline |
Definition at line 19 of file pixel_rect.hpp.
|
inline |
Definition at line 89 of file pixel_rect.hpp.
|
inlinenoexcept |
Definition at line 47 of file pixel_rect.hpp.
|
inlinenoexcept |
Definition at line 43 of file pixel_rect.hpp.
|
inline |
Definition at line 40 of file full_image.hpp.
|
inline |
Definition at line 50 of file full_image.hpp.
|
inline |
Definition at line 45 of file full_image.hpp.
|
inline |
Definition at line 55 of file full_image.hpp.
|
inline |
Definition at line 60 of file full_image.hpp.
|
inline |
Definition at line 68 of file pixel_rect.hpp.
|
inline |
Definition at line 76 of file pixel_rect.hpp.
|
inline |
Definition at line 60 of file pixel_rect.hpp.
|
inline |
Definition at line 52 of file pixel_rect.hpp.
void bnb::transform | ( | const float * | src, |
uint32_t | src_w, | ||
uint32_t | src_h, | ||
float * | dst, | ||
uint32_t | dst_w, | ||
uint32_t | dst_h, | ||
uint32_t | channels, | ||
const transformation & | t ) |
Transform src image to dst.
src,src_w,src_h | source 32 bit float image buffer, width and height |
dst,dst_w,dst_h | destination 32 bit float image buffer, width and height |
channels | number of channels per pixel |
t | transformation (src -> dst) to apply |
pixel_rect bnb::transform | ( | const pixel_rect & | rect, |
const transformation & | t ) |
Apply transformation to rect Result is normalized wrt.
flips/rotates so that w > 0 && h > 0
rect | pixel_rect to transform |
t | transformation to apply |
|
inline |
Transform point through common basis Apply transformation to point from some basis to another one through common basis NOTE: both transformations should be (common -> image) param point 2D point to transform param from,to transformations (common -> image) to apply by formula (from -> common -> to) return result 2D point.
Definition at line 261 of file transformation.hpp.
point2d bnb::transform | ( | const point2d & | point, |
const transformation & | t ) |
Apply transformation to point.
point | 2D point to transform |
t | transformation to apply |
|
inline |
Transform src image to dst through common basis NOTE: both transformations should be (common -> image)
src,src_w,src_h | source image buffer, width and height |
dst,dst_w,dst_h | destination image buffer, width and height |
channels | number of channels per pixel |
from,to | transformations (common -> image) to apply by formula (from -> common -> to) |
Definition at line 227 of file transformation.hpp.
void bnb::transform | ( | const uint8_t * | src, |
uint32_t | src_w, | ||
uint32_t | src_h, | ||
uint8_t * | dst, | ||
uint32_t | dst_w, | ||
uint32_t | dst_h, | ||
uint32_t | channels, | ||
const transformation & | t ) |
Transform src image to dst.
src,src_w,src_h | source uint8_t image buffer, width and height |
dst,dst_w,dst_h | destination uint8_t image buffer, width and height |
channels | number of channels per pixel |
t | transformation (src -> dst) to apply |
|
inline |
Transform src image to dst param src, dst source, destination image buffers param w, h source, destination width and height param channels number of channels per pixel param t transformation (src -> dst) to apply.
Definition at line 239 of file transformation.hpp.
|
inlineoverridevirtual |
Apply transform to point.
Implements bnb::interfaces::transformation.
Definition at line 276 of file transformation.hpp.
|
inlineoverridevirtual |
Implements bnb::interfaces::transformation.
Definition at line 281 of file transformation.hpp.
|
inline |
Definition at line 24 of file pixel_rect.hpp.
int32_t bnb::pixel_rect::h = 0 |
Definition at line 17 of file pixel_rect.hpp.
int32_t bnb::pixel_rect::w = 0 |
Definition at line 17 of file pixel_rect.hpp.
int32_t bnb::pixel_rect::x = 0 |
Definition at line 16 of file pixel_rect.hpp.
int32_t bnb::pixel_rect::y = 0 |
Definition at line 16 of file pixel_rect.hpp.