#pragma once
#include <iostream>
#include <vector>
#include "opencv2/core.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/imgproc.hpp"
#define ANSOCR_API __declspec(dllexport)

namespace ANSCENTER {
    class ANSOCR_API Normalize {
    public:
      virtual void Run(cv::Mat *im, const std::vector<float> &mean,
                       const std::vector<float> &scale, const bool is_scale = true);
    };
    // RGB -> CHW
    class ANSOCR_API Permute {
    public:
      virtual void Run(const cv::Mat *im, float *data);
    };
    class ANSOCR_API PermuteBatch {
    public:
      virtual void Run(const std::vector<cv::Mat> imgs, float *data);
    };
    class ANSOCR_API ResizeImgType0 {
    public:
      virtual void Run(const cv::Mat &img, cv::Mat &resize_img,
                       std::string limit_type, int limit_side_len, float &ratio_h,
                       float &ratio_w, bool use_tensorrt);
    };
    class ANSOCR_API CrnnResizeImg {
    public:
      virtual void Run(const cv::Mat &img, cv::Mat &resize_img, float wh_ratio,
                       bool use_tensorrt = false,
                       const std::vector<int> &rec_image_shape = {3, 32, 320});
    };
    class ANSOCR_API ClsResizeImg {
    public:
      virtual void Run(const cv::Mat &img, cv::Mat &resize_img,
                       bool use_tensorrt = false,
                       const std::vector<int> &rec_image_shape = {3, 48, 192});
    };
    class ANSOCR_API TableResizeImg {
    public:
      virtual void Run(const cv::Mat &img, cv::Mat &resize_img,
                       const int max_len = 488);
    };
    class ANSOCR_API TablePadImg {
    public:
      virtual void Run(const cv::Mat &img, cv::Mat &resize_img,
                       const int max_len = 488);
    };
    class ANSOCR_API Resize {
    public:
      virtual void Run(const cv::Mat &img, cv::Mat &resize_img, const int h,
                       const int w);
    };
} // namespace ANSCENTER