Face SDK  1.13.0 Mozart release
Face Recognition Software Development Kit
image.h
1 
5 #ifndef FACE_SDK_IMAGE_H
6 #define FACE_SDK_IMAGE_H
7 
8 #include <face_sdk_base/export.h>
9 
10 #include <memory>
11 #include <string>
12 #include <vector>
13 
14 namespace face_sdk
15 {
24  class FACE_SDK_EXPORT image
25  {
26  public:
27  virtual ~image();
28 
31  virtual int32_t width() const = 0;
32 
35  virtual int32_t height() const = 0;
36 
39  virtual uint64_t stride() const = 0;
40 
43  virtual uint8_t *data() const = 0;
44 
47  virtual int64_t data_size() const = 0;
48  };
49 
50  typedef std::vector< std::shared_ptr<image> > image_set;
51 
55  std::shared_ptr<face_sdk::image> FACE_SDK_EXPORT load_image_from_file(const std::string &file_name);
56 
57 #ifdef _WIN32
58  std::shared_ptr<face_sdk::image> FACE_SDK_EXPORT load_image_from_file(const std::wstring &file_name);
59 #endif
60 
66  std::shared_ptr<face_sdk::image> FACE_SDK_EXPORT load_image_from_data(const std::uint8_t *data, int32_t data_size);
67 
73  std::shared_ptr<face_sdk::image> FACE_SDK_EXPORT make_image_from_data(
74  const std::uint8_t *data, std::uint32_t width, std::uint32_t height);
75 
82  std::shared_ptr<face_sdk::image> FACE_SDK_EXPORT make_image_from_data(
83  const std::uint8_t *data, std::uint32_t width, std::uint32_t height, std::uint32_t stride);
84 
86 }
87 
88 
89 #endif // FACE_SDK_IMAGE_H
std::shared_ptr< face_sdk::image > load_image_from_file(const std::string &file_name)
Load encoded image from file. Image must be in RBG or BRG channels order. Grayscale or images with al...
std::shared_ptr< face_sdk::image > make_image_from_data(const std::uint8_t *data, std::uint32_t width, std::uint32_t height, std::uint32_t stride)
Makes image object from bitmap. Bitmap must 24bpp RGB format.
Definition: alignment_info.h:8
std::shared_ptr< face_sdk::image > load_image_from_data(const std::uint8_t *data, int32_t data_size)
Load encoded image from memory.
The image object. An image keeps bitmap data in 24bpp RBG format.
Definition: image.h:24