Face SDK  1.7 Mozart rc
Face Recognition Software Development Kit
image_compressor.h
Go to the documentation of this file.
1 
4 #ifndef FACE_SDK_IMAGE_COMPRESSOR_H
5 #define FACE_SDK_IMAGE_COMPRESSOR_H
6 
7 #include <face_sdk_base/image.h>
9 
10 #include <memory>
11 #include <vector>
12 
13 namespace face_sdk
14 {
27  {
28  _1 = 1,
29  _2,
30  _3,
31  _4,
32  _5
33  };
34 
40  {
41  public:
42  virtual ~image_compressor() = default;
43 
50  virtual std::vector<uint8_t> compress_image(const std::shared_ptr<face_sdk::image> &img, compression_level lvl) = 0;
51 
58  virtual std::shared_ptr<face_sdk::image> decompress_image(const std::vector<uint8_t> &img) = 0;
59  };
60 
67  std::shared_ptr<image_compressor> FACE_SDK_EXPORT make_image_compressor(uint32_t version);
68 
76  std::shared_ptr<image_compressor> FACE_SDK_EXPORT make_image_compressor(uint32_t version, const std::shared_ptr<face_sdk::license> &license);
77 
79 }
80 
81 #endif
face_sdk::_1
@ _1
size of resulting image will be not more than 800 bytes.
Definition: image_compressor.h:28
face_sdk::_2
@ _2
size of resulting image will be not more than 900 bytes.
Definition: image_compressor.h:29
face_sdk::image_compressor::compress_image
virtual std::vector< uint8_t > compress_image(const std::shared_ptr< face_sdk::image > &img, compression_level lvl)=0
Performs image compression.
face_sdk::make_image_compressor
std::shared_ptr< image_compressor > FACE_SDK_EXPORT make_image_compressor(uint32_t version, const std::shared_ptr< face_sdk::license > &license)
Makes an image_compressor with specified version and license.
face_sdk::image_compressor
The image_compressor. Can be used to compress and/or decompress images.
Definition: image_compressor.h:39
face_sdk::_4
@ _4
size of resulting image will be not more than 1100 bytes.
Definition: image_compressor.h:31
face_sdk::compression_level
compression_level
Level of compression used in compress_image function.
Definition: image_compressor.h:26
face_sdk::image_compressor::decompress_image
virtual std::shared_ptr< face_sdk::image > decompress_image(const std::vector< uint8_t > &img)=0
Performs image decompression.
face_sdk::_3
@ _3
size of resulting image will be not more than 1000 bytes.
Definition: image_compressor.h:30
face_sdk::license
The license object. A license object provide information about your limits in face_sdk....
Definition: license.h:23
license.h
image.h
face_sdk::_5
@ _5
size of resulting image will be not more than 1200 bytes.
Definition: image_compressor.h:32