Face SDK  1.7 Mozart rc
Face Recognition Software Development Kit
image.h
Go to the documentation of this file.
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 
13 namespace face_sdk
14 {
23  class FACE_SDK_EXPORT image
24  {
25  public:
26  virtual ~image();
27 
30  virtual int32_t width() const = 0;
31 
34  virtual int32_t height() const = 0;
35 
38  virtual uint64_t stride() const = 0;
39 
42  virtual uint8_t *data() const = 0;
43 
46  virtual int64_t data_size() const = 0;
47  };
48 
52  std::shared_ptr<face_sdk::image> FACE_SDK_EXPORT load_image_from_file(const std::string &file_name);
53 
54 #ifdef _WIN32
55  std::shared_ptr<face_sdk::image> FACE_SDK_EXPORT load_image_from_file(const std::wstring &file_name);
56 #endif
57 
63  std::shared_ptr<face_sdk::image> FACE_SDK_EXPORT load_image_from_data(const std::uint8_t *data, int32_t data_size);
64 
70  std::shared_ptr<face_sdk::image> FACE_SDK_EXPORT make_image_from_data(
71  const std::uint8_t *data, std::uint32_t width, std::uint32_t height);
72 
79  std::shared_ptr<face_sdk::image> FACE_SDK_EXPORT make_image_from_data(
80  const std::uint8_t *data, std::uint32_t width, std::uint32_t height, std::uint32_t stride);
81 
83 }
84 
85 
86 #endif // FACE_SDK_IMAGE_H
face_sdk::load_image_from_data
std::shared_ptr< face_sdk::image > FACE_SDK_EXPORT load_image_from_data(const std::uint8_t *data, int32_t data_size)
Load encoded image from memory.
face_sdk::load_image_from_file
std::shared_ptr< face_sdk::image > FACE_SDK_EXPORT 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...
face_sdk::image
The image object. An image keeps bitmap data in 24bpp RBG format.
Definition: image.h:23
face_sdk::make_image_from_data
std::shared_ptr< face_sdk::image > FACE_SDK_EXPORT 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.
export.h