VLPR.h 702 Bytes
Newer Older
Your Name's avatar
Your Name committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// PaddleOCR车牌识别
#ifndef __VLPR_H__
#define __VLPR_H__

#include <OcrDB.h>
#include <OcrSVTR.h>
#include <opencv2/opencv.hpp>
#include <CommonDefinition.h>

namespace migraphxSamples
{

class VLPR
{
liucong's avatar
liucong committed
15
    public:
Your Name's avatar
Your Name committed
16
17
18
19
    VLPR();

    ~VLPR();

liucong's avatar
liucong committed
20
21
    ErrorCode Initialize(InitializationParameterOfDB initParamOfDB,
                         InitializationParameterOfSVTR initParamOfSVTR);
Your Name's avatar
Your Name committed
22

liucong's avatar
liucong committed
23
24
    ErrorCode
    Infer(cv::Mat& img, std::vector<std::string>& recTexts, std::vector<float>& recTextScores);
Your Name's avatar
Your Name committed
25

liucong's avatar
liucong committed
26
    private:
Your Name's avatar
Your Name committed
27
28
29
    DB db;
    SVTR svtr;
    cv::FileStorage configurationFile;
liucong's avatar
liucong committed
30
    std::vector<cv::Mat> imgLists;
Your Name's avatar
Your Name committed
31
32
33
    std::string recText;
    float recTextScore;
};
liucong's avatar
liucong committed
34
} // namespace migraphxSamples
Your Name's avatar
Your Name committed
35
36

#endif