/*
* Copyright 2024 KylinSoft Co., Ltd.
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see .
*/
#ifndef __KYLIN_AI_CORE_AI_VISION_TEXT_RECOGNITION_RESULT_H__
#define __KYLIN_AI_CORE_AI_VISION_TEXT_RECOGNITION_RESULT_H__
#include
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _TextRecognitionResult TextRecognitionResult;
// 像素点的位置
typedef struct {
int x;
int y;
} PixelPoint;
// 图像中的一行文本
typedef struct _TextLine TextLine;
// 获取一行中的文本内容
AISDK_EXTERN
const char *text_line_get_value(TextLine *text_line);
// 获取一行文本的角点位置信息(四个角的位置信息),point_number固定输出为4
AISDK_EXTERN
PixelPoint *text_line_get_corner_points(TextLine *text_line, int *point_number);
// 获取识别结果的整体文本信息,不带格式
AISDK_EXTERN
const char *text_recognition_result_get_value(TextRecognitionResult *result);
AISDK_EXTERN
TextLine **text_recognition_result_get_text_lines(TextRecognitionResult *result,
int *line_count);
AISDK_EXTERN
int text_recognition_result_get_error_code(TextRecognitionResult *result);
AISDK_EXTERN
const char *text_recognition_result_get_error_message(
TextRecognitionResult *result);
#ifdef __cplusplus
}
#endif
#endif