get_text_objectT_get_text_objectGetTextObjectGetTextObjectget_text_object (算子)
名称
get_text_objectT_get_text_objectGetTextObjectGetTextObjectget_text_object — 查询文本分割结果的图标值。
签名
描述
get_text_objectget_text_objectGetTextObjectGetTextObjectGetTextObjectget_text_object queries the iconic result ResultNameResultNameResultNameResultNameresultNameresult_name of
TextResultIDTextResultIDTextResultIDTextResultIDtextResultIDtext_result_id returned by find_textfind_textFindTextFindTextFindTextfind_text。The possible parameter
values for ResultNameResultNameResultNameResultNameresultNameresult_name differ, depending on the text model used
within the text segmentation process of find_textfind_textFindTextFindTextFindTextfind_text。
In the following, first the possible parameter values for text models
with ModeModeModeModemodemode = 'auto'"auto""auto""auto""auto""auto" are listed, and then those for
text models with ModeModeModeModemodemode = 'manual'"manual""manual""manual""manual""manual".
The following results can be queried:
-
Result objects for text segmentation with text models with
ModeModeModeModemodemode = 'auto'"auto""auto""auto""auto""auto"
For each polarity, the text lines are independently sorted from top to
bottom and left to right. The character within the text lines are sorted from
left to right.
- 'all_lines'"all_lines""all_lines""all_lines""all_lines""all_lines":
-
Returns all characters in all segmented text
lines.
- ['line', LineIndex]["line", LineIndex]["line", LineIndex]["line", LineIndex]["line", LineIndex]["line", LineIndex]:
-
Returns all characters within the
text line specified by LineIndex.
For example, ['line', 0]["line", 0]["line", 0]["line", 0]["line", 0]["line", 0] returns the first line.
- ['element', Index]["element", Index]["element", Index]["element", Index]["element", Index]["element", Index]:
-
Returns the character at position Index.
For example, ['element', 0]["element", 0]["element", 0]["element", 0]["element", 0]["element", 0] returns the first character.
-
Result objects for text segmentation with text models with
ModeModeModeModemodemode = 'manual'"manual""manual""manual""manual""manual"
- 'manual_all_lines'"manual_all_lines""manual_all_lines""manual_all_lines""manual_all_lines""manual_all_lines":
-
Returns all characters in all segmented
text lines.
The text lines are sorted from top to bottom and left to right.
The characters within the text lines are sorted from left to right.
- ['manual_line', Index]["manual_line", Index]["manual_line", Index]["manual_line", Index]["manual_line", Index]["manual_line", Index]:
-
Returns all characters within the text
line specified by Index (e.g., ['manual_line',0]["manual_line",0]["manual_line",0]["manual_line",0]["manual_line",0]["manual_line",0] to
return the first line).
The characters within the text line are sorted from left to right.
If 'manual_persistence'"manual_persistence""manual_persistence""manual_persistence""manual_persistence""manual_persistence" was activated for the text model used to
create TextResultIDTextResultIDTextResultIDTextResultIDtextResultIDtext_result_id, the following additional value can be queried:
- 'manual_compensated_image'"manual_compensated_image""manual_compensated_image""manual_compensated_image""manual_compensated_image""manual_compensated_image":
-
the enhanced image used for
segmentation.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
CharactersCharactersCharactersCharacterscharacterscharacters (输出对象) object(-array) → objectHObjectHObjectHObjectHobject *
Returned result.
TextResultIDTextResultIDTextResultIDTextResultIDtextResultIDtext_result_id (输入控制) text_result → HTextResult, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Text result.
ResultNameResultNameResultNameResultNameresultNameresult_name (输入控制) string(-array) → HTupleMaybeSequence[Union[str, int]]HTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)
Name of the result to be returned.
默认值:
'all_lines'
"all_lines"
"all_lines"
"all_lines"
"all_lines"
"all_lines"
值列表:
'all_lines'"all_lines""all_lines""all_lines""all_lines""all_lines", 'element'"element""element""element""element""element", 'line'"line""line""line""line""line", 'manual_all_lines'"manual_all_lines""manual_all_lines""manual_all_lines""manual_all_lines""manual_all_lines", 'manual_compensated_image'"manual_compensated_image""manual_compensated_image""manual_compensated_image""manual_compensated_image""manual_compensated_image", 'manual_line'"manual_line""manual_line""manual_line""manual_line""manual_line"
示例(HDevelop)
read_image (Image, 'numbers_scale')
create_text_model_reader ('auto', 'Document_Rej.omc', TextModel)
* Optionally specify text properties
set_text_model_param (TextModel, 'min_char_height', 20)
find_text (Image, TextModel, TextResultID)
* Return character regions and corresponding classification results
get_text_object (Characters, TextResultID, 'all_lines')
get_text_result (TextResultID, 'class', Class)
结果
如果参数有效,算子
get_text_objectget_text_objectGetTextObjectGetTextObjectGetTextObjectget_text_object 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。
可能的前趋
find_textfind_textFindTextFindTextFindTextfind_text
另见
get_text_resultget_text_resultGetTextResultGetTextResultGetTextResultget_text_result
模块
基础