添加PaddleOCR功能

This commit is contained in:
TonyJiangWJ
2023-08-06 23:58:21 +08:00
parent 49e9961a86
commit 61f7c13262
65 changed files with 16875 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
//
// Created by fujiayi on 2020/7/3.
//
#pragma once
#include "common.h"
#include <opencv2/opencv.hpp>
#include <vector>
extern const std::vector<int> REC_IMAGE_SHAPE;
cv::Mat get_rotate_crop_image(const cv::Mat &srcimage,
const std::vector<std::vector<int>> &box);
cv::Mat crnn_resize_img(const cv::Mat &img, float wh_ratio);
template <class ForwardIterator>
inline size_t argmax(ForwardIterator first, ForwardIterator last) {
return std::distance(first, std::max_element(first, last));
}