Image representation.
More...
#include <image.h>
|
virtual | ~Image () noexcept=default |
|
|
static Ptr | Create (const uint8_t *bytes, size_t num_bytes) |
|
static Ptr | Create (const std::string &path) |
|
static Ptr | Create (const uint8_t *raw_data, uint32_t num_rows, uint32_t num_cols, ColorEncoding encoding) |
|
◆ Ptr
◆ ColorEncoding
Image color encoding.
Enumerator |
---|
kRGB888 | RGB encoding, each channel value is represented as 8 bits
|
kBGR888 | BGR encoding, each channel value is represented as 8 bits
|
◆ ~Image()
virtual docsdk::Image::~Image |
( |
| ) |
|
|
virtualdefaultnoexcept |
◆ Create() [1/3]
static Ptr docsdk::Image::Create |
( |
const uint8_t * |
bytes, |
|
|
size_t |
num_bytes |
|
) |
| |
|
static |
Image factory method, creates Image from a buffer containing image file contents.
- Parameters
-
bytes | Pointer to a buffer containing image file contents |
num_bytes | Buffer size |
- Returns
- Smart pointer to created Image instance
- Exceptions
-
◆ Create() [2/3]
static Ptr docsdk::Image::Create |
( |
const std::string & |
path | ) |
|
|
static |
Image factory method, creates Image from an image file using given file path.
- Parameters
-
- Returns
- Smart pointer to created Image instance
- Exceptions
-
◆ Create() [3/3]
static Ptr docsdk::Image::Create |
( |
const uint8_t * |
raw_data, |
|
|
uint32_t |
num_rows, |
|
|
uint32_t |
num_cols, |
|
|
ColorEncoding |
encoding |
|
) |
| |
|
static |
Image factory method, creates Image from raw color data.
- Parameters
-
raw_data | Raw color data (three-dimensional array containing color channel values for each image pixel) |
num_rows | Number of image rows |
num_cols | Number of image columns |
encoding | Image color encoding |
- Returns
- Smart pointer to created Image instance
- Exceptions
-
The documentation for this struct was generated from the following file: