OpenShot Library | libopenshot  0.3.2
Public Member Functions | Public Attributes | List of all members
openshot::BBox Struct Reference

This struct holds the information of a bounding-box. More...

#include <TrackedObjectBBox.h>

Public Member Functions

 BBox ()
 Blank constructor. More...
 
 BBox (float _cx, float _cy, float _width, float _height, float _angle)
 
std::string Json () const
 Generate JSON string of this object. More...
 
Json::Value JsonValue () const
 Generate Json::Value for this object. More...
 
void SetJson (const std::string value)
 Load JSON string into this object. More...
 
void SetJsonValue (const Json::Value root)
 Load Json::Value into this object. More...
 

Public Attributes

float angle = -1
 bounding box rotation angle [degrees] More...
 
float cx = -1
 x-coordinate of the bounding box center More...
 
float cy = -1
 y-coordinate of the bounding box center More...
 
float height = -1
 bounding box height More...
 
float width = -1
 bounding box width More...
 

Detailed Description

This struct holds the information of a bounding-box.

A bounding-box is a rectangular shape that enclosures an object or a desired set of pixels in a digital image.

The bounding-box structure holds five floating-point properties: the x and y coordinates of the rectangle's center point (cx, cy), the rectangle's width, height and rotation.

Definition at line 37 of file TrackedObjectBBox.h.

Constructor & Destructor Documentation

◆ BBox() [1/2]

openshot::BBox::BBox ( )
inline

Blank constructor.

Definition at line 46 of file TrackedObjectBBox.h.

◆ BBox() [2/2]

openshot::BBox::BBox ( float  _cx,
float  _cy,
float  _width,
float  _height,
float  _angle 
)
inline

Default constructor, which takes the bounding box top-left corner coordinates, width and height.

Parameters
_cxX-coordinate of the bounding box center
_cyY-coordinate of the bounding box center
_widthBounding box width
_heightBounding box height
_angleBounding box rotation angle [degrees]

Definition at line 54 of file TrackedObjectBBox.h.

Member Function Documentation

◆ Json()

std::string openshot::BBox::Json ( ) const
inline

Generate JSON string of this object.

Definition at line 65 of file TrackedObjectBBox.h.

◆ JsonValue()

Json::Value openshot::BBox::JsonValue ( ) const
inline

Generate Json::Value for this object.

Definition at line 71 of file TrackedObjectBBox.h.

Referenced by Json().

◆ SetJson()

void openshot::BBox::SetJson ( const std::string  value)
inline

Load JSON string into this object.

Definition at line 84 of file TrackedObjectBBox.h.

◆ SetJsonValue()

void openshot::BBox::SetJsonValue ( const Json::Value  root)
inline

Load Json::Value into this object.

Definition at line 101 of file TrackedObjectBBox.h.

Referenced by SetJson().

Member Data Documentation

◆ angle

float openshot::BBox::angle = -1

◆ cx

float openshot::BBox::cx = -1

◆ cy

float openshot::BBox::cy = -1

◆ height

float openshot::BBox::height = -1

◆ width

float openshot::BBox::width = -1

The documentation for this struct was generated from the following file: