Structure containing the width and height of an image. More...
Functions | |
Resolution (size_t w_=0, size_t h_=0) | |
Default constructor. More... | |
size_t | area () const |
Returns the area (width * height) of the image. More... | |
bool | operator== (const Resolution &that) const |
Tests if the given sl::Resolution has the same properties. More... | |
bool | operator!= (const Resolution &that) const |
Tests if the given sl::Resolution has different properties. More... | |
bool | encode (String &serialized_content, SERIALIZATION_FORMAT format=SERIALIZATION_FORMAT::JSON) const |
Generate a JSON Object (with the struct type as a key) containing the serialized struct, converted into a string. More... | |
bool | decode (const String &serialized_content, SERIALIZATION_FORMAT format=SERIALIZATION_FORMAT::JSON) |
Fill the structure from the serialized json object contained in the input string. More... | |
Attributes | |
size_t | width |
Width of the image in pixels. More... | |
size_t | height |
Height of the image in pixels. More... | |
Structure containing the width and height of an image.
|
inline |
Default constructor.
|
inline |
Returns the area (width * height) of the image.
|
inline |
Tests if the given sl::Resolution has the same properties.
|
inline |
Tests if the given sl::Resolution has different properties.
bool encode | ( | String & | serialized_content, |
SERIALIZATION_FORMAT | format = SERIALIZATION_FORMAT::JSON |
||
) | const |
Generate a JSON Object (with the struct type as a key) containing the serialized struct, converted into a string.
serialized_content | output string containing the JSON Object |
format | serialization format, default is JSON |
bool decode | ( | const String & | serialized_content, |
SERIALIZATION_FORMAT | format = SERIALIZATION_FORMAT::JSON |
||
) |
Fill the structure from the serialized json object contained in the input string.
serialized_content | input string containing the JSON Object |
format | serialization format, default is JSON |
size_t width |
Width of the image in pixels.
Referenced by Mat::getWidth(), Mat::getWidthBytes(), Rect::isContained(), Resolution::operator!=(), Resolution::operator==(), and CameraParameters::scale().
size_t height |
Height of the image in pixels.
Referenced by Mat::getHeight(), Rect::isContained(), Resolution::operator!=(), Resolution::operator==(), and CameraParameters::scale().