| 1 | /* |
| 2 | * Copyright 2024 KylinSoft Co., Ltd. |
| 3 | * |
| 4 | * This program is free software: you can redistribute it and/or modify it under |
| 5 | * the terms of the GNU General Public License as published by the Free Software |
| 6 | * Foundation, either version 3 of the License, or (at your option) any later |
| 7 | * version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, but WITHOUT |
| 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 11 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
| 12 | * details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License along with |
| 15 | * this program. If not, see <https://www.gnu.org/licenses/>. |
| 16 | */ |
| 17 | |
| 18 | #ifndef __KYLIN_AI_CORE_AI_VISION_TEXT_RECOGNITION_RESULT_H__ |
| 19 | #define __KYLIN_AI_CORE_AI_VISION_TEXT_RECOGNITION_RESULT_H__cxx . . $ `include/kylin-ai/coreai/vision/textrecognitionresult.h:19:9`! |
| 20 | |
| 21 | #include <kylin-ai/common/macros.h> |
| 22 | |
| 23 | #ifdef __cpluspluscxx . . $ `<built-in>:470:9`! |
| 24 | extern "C" { |
| 25 | #endif |
| 26 | |
| 27 | typedef struct _TextRecognitionResultcxx . . $ _TextRecognitionResult# TextRecognitionResult; |
| 28 | |
| 29 | // 像素点的位置 |
| 30 | typedef struct { |
| 31 | int x; |
| 32 | int y; |
| 33 | } PixelPoint; |
| 34 | |
| 35 | // 图像中的一行文本 |
| 36 | typedef struct _TextLinecxx . . $ _TextLine# TextLine; |
| 37 | |
| 38 | // 获取一行中的文本内容 |
| 39 | AISDK_EXTERNcxx . . $ `<external>/16012735566347328758/macros.h:21:9`! |
| 40 | const char *text_line_get_value(TextLine *text_line); |
| 41 | |
| 42 | // 获取一行文本的角点位置信息(四个角的位置信息),point_number固定输出为4 |
| 43 | AISDK_EXTERNcxx . . $ `<external>/16012735566347328758/macros.h:21:9`! |
| 44 | PixelPoint *text_line_get_corner_points(TextLine *text_line, int *point_number); |
| 45 | |
| 46 | // 获取识别结果的整体文本信息,不带格式 |
| 47 | AISDK_EXTERNcxx . . $ `<external>/16012735566347328758/macros.h:21:9`! |
| 48 | const char *text_recognition_result_get_value(TextRecognitionResult *result); |
| 49 | |
| 50 | AISDK_EXTERNcxx . . $ `<external>/16012735566347328758/macros.h:21:9`! |
| 51 | TextLine **text_recognition_result_get_text_lines(TextRecognitionResult *result, |
| 52 | int *line_count); |
| 53 | |
| 54 | AISDK_EXTERNcxx . . $ `<external>/16012735566347328758/macros.h:21:9`! |
| 55 | int text_recognition_result_get_error_code(TextRecognitionResult *result); |
| 56 | |
| 57 | AISDK_EXTERNcxx . . $ `<external>/16012735566347328758/macros.h:21:9`! |
| 58 | const char *text_recognition_result_get_error_message( |
| 59 | TextRecognitionResult *result); |
| 60 | |
| 61 | #ifdef __cpluspluscxx . . $ `<built-in>:470:9`! |
| 62 | } |
| 63 | #endif |
| 64 | |
| 65 | #endif |