23#include <opencv2/opencv.hpp>
29cv::Mat
GetImage(
const std::string &path,
bool to_rgb =
false);
31void Resize(
const cv::Mat &input_img, cv::Mat *out_img, cv::Size size,
32 double fx = 0,
double fy = 0,
int interpolation = cv::INTER_LINEAR);
34void Normalize(
const std::vector<float> &mean,
const std::vector<float> &
std,
35 float scale, cv::Mat *img);
37std::vector<float>
HWC2CHW(
const cv::Mat &input_img);
void Resize(cv::Mat *img, cv::Mat *img_n, int width, int height)
Image resize function
void Normalize(const std::vector< float > &mean, const std::vector< float > &std, float scale, cv::Mat *img)
Image normalize function
cv::Mat GetImage(const std::string &path, bool to_rgb)
std::vector< float > HWC2CHW(const cv::Mat &input_img)