find_text — Segment text in an image.
find_text segments text specified by TextModel in Image and returns the result in TextResultID. Specific results of TextResultID can be obtained by get_text_result and get_text_object.
find_text segments only text which is roughly horizontally aligned in the input image. text_line_orientation and rotate_image can be used to achieve this alignment.
The input image is preprocessed such that character like structures are enhanced. On this image find_text applies several thresholds and selects character candidates based on region and gray value features. These candidates are further clustered to lines. Each line is individually completed and tested if it fulfills the constraints of a text line. A text line consists of at least three characters. If TextModel contains 'text_line_structure' entries, the completed line is fitted to these structures. Finally interpunctations and separators are added if the correspondent parameters were set via set_text_model_param.
Since memory is allocated for the text result during the call of find_text and during the following operations, the text result should be freed explicitly by the operator clear_text_result as soon as it is no longer used.
Text model specifying the text to be segmented.
Result of the segmentation.
If the parameters are valid, the operator find_text returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.
create_text_model, set_text_model_param, text_line_orientation, text_line_slant