![]() |
Banuba SDK
|
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...
#include <full_image.hpp>
Public Types | |
| using | plane_deleter = std::function<void(uint8_t*)> |
| Public Types inherited from bnb::base_event< full_image_t > | |
| using | allocator |
Public Member Functions | |
| full_image_t () | |
| Construct a new full_image_t object with default params. | |
| full_image_t (bpc8_image_t image) | |
Construct a new full_image_t object from image. | |
| full_image_t (yuv_image_t image) | |
Construct a new full_image_t object from image. | |
| full_image_t (const full_image_t &) | |
| Construct a new full_image_t object using copy operation. | |
| full_image_t & | operator= (const full_image_t &) |
| full_image_t (full_image_t &&) noexcept | |
| Construct a new full_image_t object using move semantics. | |
| full_image_t & | operator= (full_image_t &&other) noexcept |
| image_format | get_format () const |
| bool | is_landscape () const |
| bnb::transformation | get_subchannel_basis_transform (float inv_scale=1.f) const |
| bnb::transformation | image_basis () const |
| template<typename T> | |
| const T & | get_data () const noexcept |
| template<typename T> | |
| bool | has_data () const noexcept |
| void | set_fov (float fov) |
Set the field of view ( fov ) object. | |
| void | normalize_orientation () |
| Normalize image data if it is required to be mirrored or camera orientation isn't deg_0. | |
| void | set_camera_transform (const float in_origin_x, const float in_origin_y, const float in_scale_x, const float in_scale_y) |
| orientation | get_orientation () const |
| Returns the orientation of the image. | |
| bool | get_mirroring () const |
| Returns the mirroring of the image. | |
| pixel_buffer_format | get_pixel_buffer_format () const |
| Returns format of the image. | |
| color_std | get_color_standard () const |
| Returns yuv color standard of the image. | |
| color_range | get_color_range () const |
| Returns yuv color range of the image. | |
| uint32_t | get_number_of_planes () const |
| Returns count of the planes. | |
| uint8_t * | get_base_ptr () const |
| Returns the shared pointer of the first plane. | |
| uint8_t * | get_base_ptr_of_plane (uint32_t plane_num) const |
| Returns the shared pointer to pixel data of the specified plane. | |
| int32_t | get_bytes_per_pixel () const |
| Returns the pixel size of the first plane. | |
| int32_t | get_bytes_per_pixel_of_plane (uint32_t plane_num) const |
| Returns the pixel size of the specified plane. | |
| int32_t | get_bytes_per_row () const |
| Returns the stride of the first plane. | |
| int32_t | get_bytes_per_row_of_plane (uint32_t plane_num) const |
| Returns the stride of the specified plane. | |
| int32_t | get_width () const |
| Returns the width of the first plane. | |
| int32_t | get_width_of_plane (uint32_t plane_num) const |
| Returns the width of the specified plane. | |
| int32_t | get_height () const |
| Returns the height of the first plane. | |
| int32_t | get_height_of_plane (uint32_t plane_num) const |
| Returns the height of the specified plane. | |
| Public Member Functions inherited from bnb::base_event< full_image_t > | |
| event_id_t | get_type_id () const noexcept final |
Static Public Member Functions | |
| static full_image_t | load (const std::string &path, bool alpha=false) |
A method for loading video from path with/whithout alpha. | |
| static full_image_t | create_bpc8 (const uint8_t *rgb_plane, int32_t rgb_stride, int32_t width, int32_t height, pixel_buffer_format fmt, orientation orient, bool mirroring, plane_deleter deleter) |
| static full_image_t | create_nv12 (const uint8_t *y_plane, int32_t y_stride, const uint8_t *uv_plane, int32_t uv_stride, int32_t width, int32_t height, bnb::color_std std, bnb::color_range rng, orientation orient, bool mirroring, plane_deleter y_deleter, plane_deleter uv_deleter) |
| static full_image_t | create_i420 (const uint8_t *y_plane, int32_t y_stride, const uint8_t *u_plane, int32_t u_stride, const uint8_t *v_plane, int32_t v_stride, int32_t width, int32_t height, bnb::color_std std, bnb::color_range rng, orientation orient, bool mirroring, plane_deleter y_deleter, plane_deleter u_deleter, plane_deleter v_deleter) |
| Static Public Member Functions inherited from bnb::identified_class< event_id_t, full_image_t > | |
| static const char * | get_name () noexcept |
| static event_id_t | get_id () noexcept |
Public Attributes | |
| unsigned | camera_tex_id = 0 |
| Public Attributes inherited from bnb::transformable_event< full_image_t > | |
| transformation | basis_transform |
| (common -> some event data basis) transformation | |
| transformation | post_transform |
| used to make final transformation (scale/offset) for camera image and segm. masks | |
| pixel_rect | full_roi |
| rectangle area in common basis that encloses all valid & usable data | |
Additional Inherited Members | |
| Static Public Attributes inherited from bnb::base_event< full_image_t > | |
| static const event_id_t | id |
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);
Definition at line 480 of file full_image.hpp.
| using bnb::full_image_t::plane_deleter = std::function<void(uint8_t*)> |
Definition at line 591 of file full_image.hpp.
|
explicit |
Construct a new full_image_t object from image.
| image | is a C++ bpc8 image ( |
|
explicit |
Construct a new full_image_t object from image.
| image | is a C++ yuv image ( |
| uint8_t * bnb::full_image_t::get_base_ptr_of_plane | ( | uint32_t | plane_num | ) | const |
Returns the shared pointer to pixel data of the specified plane.
| plane_num | plane number. Must be 0 for bpc8, [0..1] for nv12 and [0..2] for i420 images |
| int32_t bnb::full_image_t::get_bytes_per_pixel_of_plane | ( | uint32_t | plane_num | ) | const |
Returns the pixel size of the specified plane.
| plane_num | plane number. Must be 0 for bpc8, [0..1] for nv12 and [0..2] for i420 images |
| int32_t bnb::full_image_t::get_bytes_per_row_of_plane | ( | uint32_t | plane_num | ) | const |
Returns the stride of the specified plane.
| plane_num | plane number. Must be 0 for bpc8, [0..1] for nv12 and [0..2] for i420 images |
| color_range bnb::full_image_t::get_color_range | ( | ) | const |
Returns yuv color range of the image.
| color_std bnb::full_image_t::get_color_standard | ( | ) | const |
Returns yuv color standard of the image.
| image_format bnb::full_image_t::get_format | ( | ) | const |
| int32_t bnb::full_image_t::get_height_of_plane | ( | uint32_t | plane_num | ) | const |
Returns the height of the specified plane.
| plane_num | plane number. Must be 0 for bpc8, [0..1] for nv12 and [0..2] for i420 images |
| bool bnb::full_image_t::get_mirroring | ( | ) | const |
Returns the mirroring of the image.
Mirroring applied after orientation
| orientation bnb::full_image_t::get_orientation | ( | ) | const |
Returns the orientation of the image.
| pixel_buffer_format bnb::full_image_t::get_pixel_buffer_format | ( | ) | const |
Returns format of the image.
|
inline |
Definition at line 545 of file full_image.hpp.
| int32_t bnb::full_image_t::get_width_of_plane | ( | uint32_t | plane_num | ) | const |
Returns the width of the specified plane.
| plane_num | plane number. Must be 0 for bpc8, [0..1] for nv12 and [0..2] for i420 images |
|
inline |
Definition at line 553 of file full_image.hpp.
| bool bnb::full_image_t::is_landscape | ( | ) | const |
|
static |
A method for loading video from path with/whithout alpha.
| path | is a full path to downloadable image. |
| alpha | is value responcible that image includes alpha channel. |
path or nullptr. | void bnb::full_image_t::set_fov | ( | float | fov | ) |
Set the field of view ( fov ) object.
| fov | is a field of view in degrees. |
| unsigned bnb::full_image_t::camera_tex_id = 0 |
Definition at line 583 of file full_image.hpp.