"mmdet3d/evaluation/functional/indoor_eval.py" did not exist on "d7f69840670febe3215fee48a99c5382dd6ad655"
OcrResultUtils.h 707 Bytes
Newer Older
yangql's avatar
yangql committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifdef __JNI__
#ifndef __OCR_RESULT_UTILS_H__
#define __OCR_RESULT_UTILS_H__
#include <jni.h>
#include "OcrStruct.h"

class OcrResultUtils {
public:
    OcrResultUtils(JNIEnv *env, OcrResult &ocrResult);

    ~OcrResultUtils();

    jobject getJObject();

private:
    JNIEnv *jniEnv;
    jobject jOcrResult;

    jclass newJListClass();

    jmethodID getListConstructor(jclass clazz);

    jobject getTextBlock(TextBlock &textBlock);

    jobject getTextBlocks(std::vector<TextBlock> &textBlocks);

    jobject newJPoint(cv::Point &point);

    jobject newJBoxPoint(std::vector<cv::Point> &boxPoint);

    jfloatArray newJScoreArray(std::vector<float> &scores);

};
#endif //__OCR_RESULT_UTILS_H__
#endif