ClassesClassesClassesClasses | | | | Operators

set_text_model_paramset_text_model_paramSetTextModelParamset_text_model_paramSetTextModelParamSetTextModelParam (Operator)

Name

set_text_model_paramset_text_model_paramSetTextModelParamset_text_model_paramSetTextModelParamSetTextModelParam — Set parameters of a text model.

Signature

set_text_model_param( : : TextModel, Param, Value : )

Herror set_text_model_param(const Hlong TextModel, const char* Param, const Hlong Value)

Herror T_set_text_model_param(const Htuple TextModel, const Htuple Param, const Htuple Value)

Herror set_text_model_param(const HTuple& TextModel, const HTuple& Param, const HTuple& Value)

void HTextModel::SetTextModelParam(const HTuple& Param, const HTuple& Value) const

void SetTextModelParam(const HTuple& TextModel, const HTuple& Param, const HTuple& Value)

void HTextModel::SetTextModelParam(const HTuple& Param, const HTuple& Value) const

void HTextModel::SetTextModelParam(const HString& Param, Hlong Value) const

void HTextModel::SetTextModelParam(const char* Param, Hlong Value) const

void HOperatorSetX.SetTextModelParam(
[in] VARIANT TextModel, [in] VARIANT Param, [in] VARIANT Value)

void HTextModelX.SetTextModelParam(
[in] VARIANT Param, [in] VARIANT Value)

static void HOperatorSet.SetTextModelParam(HTuple textModel, HTuple param, HTuple value)

void HTextModel.SetTextModelParam(HTuple param, HTuple value)

void HTextModel.SetTextModelParam(string param, int value)

Description

set_text_model_paramset_text_model_paramSetTextModelParamset_text_model_paramSetTextModelParamSetTextModelParam sets parameters of a text model. The following values for ParamParamParamParamParamparam are allowed:

'char_height'"char_height""char_height""char_height""char_height""char_height":

Height of the characters in pixel. Refers to an uppercase character. Default value: 30px

'char_width'"char_width""char_width""char_width""char_width""char_width":

Width of the characters in pixel. Refers to an uppercase character. Default value: 20px

'stroke_width'"stroke_width""stroke_width""stroke_width""stroke_width""stroke_width":

Stroke width of the characters in pixel. Default value: 4.0px

'base_line_tolarance'"base_line_tolarance""base_line_tolarance""base_line_tolarance""base_line_tolarance""base_line_tolarance":

Maximum base line deviation of the characters (in percent of 'char_height'"char_height""char_height""char_height""char_height""char_height"). Default value: 0.15

'polarity'"polarity""polarity""polarity""polarity""polarity":

'dark_on_light'"dark_on_light""dark_on_light""dark_on_light""dark_on_light""dark_on_light" if the text to be segmented is darker than its background, otherwise 'light_on_dark'"light_on_dark""light_on_dark""light_on_dark""light_on_dark""light_on_dark". Default value: 'dark_on_light'"dark_on_light""dark_on_light""dark_on_light""dark_on_light""dark_on_light"

'uppercase_only'"uppercase_only""uppercase_only""uppercase_only""uppercase_only""uppercase_only":

'true'"true""true""true""true""true" if the text to be segmented contains uppercase characters or numbers only, otherwise 'false'"false""false""false""false""false". Default value: 'false'"false""false""false""false""false"

'is_dotprint'"is_dotprint""is_dotprint""is_dotprint""is_dotprint""is_dotprint":

'true'"true""true""true""true""true" if the text to be segmented is a dotprint, otherwise 'false'"false""false""false""false""false". Default value: 'false'"false""false""false""false""false"

'is_imprinted'"is_imprinted""is_imprinted""is_imprinted""is_imprinted""is_imprinted":

'true'"true""true""true""true""true" if the text to be segmented suffers of local changes of polarity due to reflections, otherwise 'false'"false""false""false""false""false". Default value: 'false'"false""false""false""false""false"

'eliminate_horizontal_lines'"eliminate_horizontal_lines""eliminate_horizontal_lines""eliminate_horizontal_lines""eliminate_horizontal_lines""eliminate_horizontal_lines":

'true'"true""true""true""true""true" if there are longer horizontal structures close to the text to be segmented, otherwise 'false'"false""false""false""false""false". Default value: 'false'"false""false""false""false""false"

'eliminate_border_blobs'"eliminate_border_blobs""eliminate_border_blobs""eliminate_border_blobs""eliminate_border_blobs""eliminate_border_blobs":

'true'"true""true""true""true""true" if regions that are touching the border of the image domain should be discarded, otherwise 'false'"false""false""false""false""false". Default value: 'false'"false""false""false""false""false"

'max_line_num'"max_line_num""max_line_num""max_line_num""max_line_num""max_line_num":

Maximum number of lines to be found. Zero or negative values indicate no limitation. Setting 'max_line_num'"max_line_num""max_line_num""max_line_num""max_line_num""max_line_num" to a low value may strongly improve the runtime of find_textfind_textFindTextfind_textFindTextFindText. Default value: no limitation

'return_punctuation'"return_punctuation""return_punctuation""return_punctuation""return_punctuation""return_punctuation":

'true'"true""true""true""true""true" if punctation marks (e.g., dots or comma) should be added to the segmented characters. Default value: 'true'"true""true""true""true""true"

'return_separators'"return_separators""return_separators""return_separators""return_separators""return_separators":

'true'"true""true""true""true""true" if separators such as a minus or the equality sign should be added to the segmented characters. Default value: 'true'"true""true""true""true""true"

'add_fragments'"add_fragments""add_fragments""add_fragments""add_fragments""add_fragments":

'true'"true""true""true""true""true" if fragment such as the dot on the 'i' should be added to the segmented characters. Be aware, that this can cause noise to be added to the segmented characters. Default value: 'true'"true""true""true""true""true"

'fragment_size_min'"fragment_size_min""fragment_size_min""fragment_size_min""fragment_size_min""fragment_size_min":

minimum area of fragment regions that are added if 'add_fragments'"add_fragments""add_fragments""add_fragments""add_fragments""add_fragments" is set to 'true'"true""true""true""true""true". Default value: 1

'text_line_structure'"text_line_structure""text_line_structure""text_line_structure""text_line_structure""text_line_structure":

specifies the structure of the text to be found to reduce the search space and to avoid false positives. The structure is a string that contains the number of characters for every character block and spaces between these character blocks. For example, if the text to be found is a date with two characters for month, day, and year the structure would be '2 2 2'. If the year may also consist of four characters the structure would be '2 2 2-4', indicating that the last character block consists of two to four characters. It is possible to provide more than one structure to match by appending an index to the parameter name, e.g. 'text_line_structure_0', 'text_line_structure_1'. If 'text_line_structure'"text_line_structure""text_line_structure""text_line_structure""text_line_structure""text_line_structure" is set to an empty string ' ', the text to be found may have any structure.

'persistence'"persistence""persistence""persistence""persistence""persistence":

'true'"true""true""true""true""true" if selected intermediate results should be kept with the output result of find_textfind_textFindTextfind_textFindTextFindText.

Parallelization

Parameters

TextModelTextModelTextModelTextModelTextModeltextModel (input_control)  text_model HTextModel, HTupleHTupleHTextModel, HTupleHTextModelX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Text model.

ParamParamParamParamParamparam (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Parameters to be set.

Default value: 'char_width' "char_width" "char_width" "char_width" "char_width" "char_width"

List of values: 'add_fragments'"add_fragments""add_fragments""add_fragments""add_fragments""add_fragments", 'base_line_tolerance'"base_line_tolerance""base_line_tolerance""base_line_tolerance""base_line_tolerance""base_line_tolerance", 'char_height'"char_height""char_height""char_height""char_height""char_height", 'char_width'"char_width""char_width""char_width""char_width""char_width", 'eliminate_border_blobs'"eliminate_border_blobs""eliminate_border_blobs""eliminate_border_blobs""eliminate_border_blobs""eliminate_border_blobs", 'eliminate_horizontal_lines'"eliminate_horizontal_lines""eliminate_horizontal_lines""eliminate_horizontal_lines""eliminate_horizontal_lines""eliminate_horizontal_lines", 'fragment_size_min'"fragment_size_min""fragment_size_min""fragment_size_min""fragment_size_min""fragment_size_min", 'is_dotprint'"is_dotprint""is_dotprint""is_dotprint""is_dotprint""is_dotprint", 'is_imprinted'"is_imprinted""is_imprinted""is_imprinted""is_imprinted""is_imprinted", 'max_line_num'"max_line_num""max_line_num""max_line_num""max_line_num""max_line_num", 'persistence'"persistence""persistence""persistence""persistence""persistence", 'polarity'"polarity""polarity""polarity""polarity""polarity", 'return_punctuation'"return_punctuation""return_punctuation""return_punctuation""return_punctuation""return_punctuation", 'return_separators'"return_separators""return_separators""return_separators""return_separators""return_separators", 'stroke_width'"stroke_width""stroke_width""stroke_width""stroke_width""stroke_width", 'text_line_structure'"text_line_structure""text_line_structure""text_line_structure""text_line_structure""text_line_structure", 'text_line_structure_0'"text_line_structure_0""text_line_structure_0""text_line_structure_0""text_line_structure_0""text_line_structure_0", 'text_line_structure_1'"text_line_structure_1""text_line_structure_1""text_line_structure_1""text_line_structure_1""text_line_structure_1", 'text_line_structure_2'"text_line_structure_2""text_line_structure_2""text_line_structure_2""text_line_structure_2""text_line_structure_2", 'uppercase_only'"uppercase_only""uppercase_only""uppercase_only""uppercase_only""uppercase_only"

ValueValueValueValueValuevalue (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*) (Hlong / double / BSTR) (Hlong / double / char*)

Values of Param.

Default value: 'true' "true" "true" "true" "true" "true"

List of values: 'dark_on_light'"dark_on_light""dark_on_light""dark_on_light""dark_on_light""dark_on_light", 'false'"false""false""false""false""false", 'light_on_dark'"light_on_dark""light_on_dark""light_on_dark""light_on_dark""light_on_dark", 'true'"true""true""true""true""true"

Result

If the input parameters are set correctly, the operator set_text_model_paramset_text_model_paramSetTextModelParamset_text_model_paramSetTextModelParamSetTextModelParam returns the value 2 (H_MSG_TRUE). Otherwise, an exception will be raised.

Possible Predecessors

create_text_modelcreate_text_modelCreateTextModelcreate_text_modelCreateTextModelCreateTextModel

Possible Successors

find_textfind_textFindTextfind_textFindTextFindText

See also

get_text_model_paramget_text_model_paramGetTextModelParamget_text_model_paramGetTextModelParamGetTextModelParam

Module

Foundation


ClassesClassesClassesClasses | | | | Operators