superScale.h 539 字节
#ifndef __SCALE_SUPER_SCALE_H_
#define __SCALE_SUPER_SCALE_H_

#include <stdio.h>
#include "opencv2/dnn.hpp"
#include "opencv2/imgproc.hpp"

class SuperScale {
public:
	SuperScale() {};
	~SuperScale() {};
	int init(const std::string &proto_path, const std::string &model_path);
	cv::Mat processImageScale(const cv::Mat &src, float scale, const bool &use_sr, int sr_max_size = 160);

private:
	cv::dnn::Net srnet_;
	bool net_loaded_ = false;
	int superResoutionScale(const cv::Mat &src, cv::Mat &dst);
};

#endif  // __SCALE_SUPER_SCALE_H_