get_text_objectT_get_text_objectGetTextObjectGetTextObjectget_text_object (Operator)

Name

get_text_objectT_get_text_objectGetTextObjectGetTextObjectget_text_object — Query an iconic value of a text segmentation result.

Signature

get_text_object( : Characters : TextResultID, ResultName : )

Herror T_get_text_object(Hobject* Characters, const Htuple TextResultID, const Htuple ResultName)

void GetTextObject(HObject* Characters, const HTuple& TextResultID, const HTuple& ResultName)

HObject HTextResult::GetTextObject(const HTuple& ResultName) const

HObject HTextResult::GetTextObject(const HString& ResultName) const

HObject HTextResult::GetTextObject(const char* ResultName) const

HObject HTextResult::GetTextObject(const wchar_t* ResultName) const   (Windows only)

static void HOperatorSet.GetTextObject(out HObject characters, HTuple textResultID, HTuple resultName)

HObject HTextResult.GetTextObject(HTuple resultName)

HObject HTextResult.GetTextObject(string resultName)

def get_text_object(text_result_id: HHandle, result_name: MaybeSequence[Union[str, int]]) -> HObject

Description

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:

Execution Information

Parameters

CharactersCharactersCharactersCharacterscharacterscharacters (output_object)  object(-array) objectHObjectHObjectHObjectHobject *

Returned result.

TextResultIDTextResultIDTextResultIDTextResultIDtextResultIDtext_result_id (input_control)  text_result HTextResult, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Text result.

ResultNameResultNameResultNameResultNameresultNameresult_name (input_control)  string(-array) HTupleMaybeSequence[Union[str, int]]HTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)

Name of the result to be returned.

Default value: 'all_lines' "all_lines" "all_lines" "all_lines" "all_lines" "all_lines"

List of values: '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"

Example (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)

Result

If the parameters are valid, the operator get_text_objectget_text_objectGetTextObjectGetTextObjectGetTextObjectget_text_object returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.

Possible Predecessors

find_textfind_textFindTextFindTextFindTextfind_text

See also

get_text_resultget_text_resultGetTextResultGetTextResultGetTextResultget_text_result

Module

Foundation