1234567891011121314151617181920212223242526272829303132333435363738 |
- #pragma once
- #include <cstring>
- #include <fstream>
- #include <iostream>
- #include <memory>
- #include <string>
- #include <vector>
- #include "math.h"
- #include "opencv2/core.hpp"
- #include "opencv2/imgcodecs.hpp"
- #include "opencv2/imgproc.hpp"
- cv::Mat CrnnResizeImg(cv::Mat img, float wh_ratio, int rec_image_height);
- std::vector<std::string> ReadDict(std::string path);
- cv::Mat GetRotateCropImage(cv::Mat srcimage, std::vector<std::vector<int>> box);
- template <class ForwardIterator>
- inline size_t Argmax(ForwardIterator first, ForwardIterator last) {
- return std::distance(first, std::max_element(first, last));
- }
|