PosturePerfection
pre_processor.h
Go to the documentation of this file.
1 
23 #ifndef SRC_PRE_PROCESSOR_H_
24 #define SRC_PRE_PROCESSOR_H_
25 
26 #include <stdint.h>
27 
28 #include <memory>
29 
31 #include "opencv2/opencv.hpp"
32 
38 namespace PreProcessing {
39 
51 class PreProcessor {
52  private:
53  size_t model_width;
54  size_t model_height;
55 
62  void normalise(uint8_t* resized_image, float* normalised_image);
63 
64  public:
74  PreProcessor(size_t model_width, size_t model_height);
75 
82  PreProcessedImage run(cv::Mat cv_image);
83 };
84 
85 } // namespace PreProcessing
86 #endif // SRC_PRE_PROCESSOR_H_
Pre-process the input image before passing to Inference::InferenceCore
Definition: pre_processor.h:51
PreProcessedImage run(cv::Mat cv_image)
Apply pre processing to the given input image.
Definition: pre_processor.cpp:44
PreProcessor(size_t model_width, size_t model_height)
Construct a new PreProcessor object.
Definition: pre_processor.cpp:26
Data structures used in communicating between different parts of the system.
Responsible for resizing and normalising the input image to a structure suitable for TensorFlow Lite.
Definition: intermediate_structures.h:77
A structure of the pre processed image.
Definition: intermediate_structures.h:85