HALCON Reference Manual 10.0.2
Table of Contents / OCR / Segmentation ClassesClassesClasses | | | Operators

find_textfind_textfind_textFindTextFindText (Operator)

Name

find_textfind_textfind_textFindTextFindText — Segment text in an image.

Signature

find_text(Image : : TextModel : TextResultID)

Herror find_text(const Hobject Image, const Hlong TextModel, Hlong* TextResultID)

Herror T_find_text(const Hobject Image, const Htuple TextModel, Htuple* TextResultID)

Herror find_text(Hobject Image, const HTuple& TextModel, Hlong* TextResultID)

HTextResult HImage::FindText(const HTextModel& TextModel) const

HTextResult HTextModel::FindText(const HImage& Image) const

void HTextResult::FindText(const HImage& Image, const HTextModel& TextModel)

void HOperatorSetX.FindText(
[in] IHUntypedObjectX* Image, [in] VARIANT TextModel, [out] VARIANT* TextResultID)

IHTextResultX* HImageX.FindText([in] IHTextModelX* TextModel)

IHTextResultX* HTextModelX.FindText([in] IHImageX* Image)

void HTextResultX.FindText(
[in] IHImageX* Image, [in] IHTextModelX* TextModel)

static void HOperatorSet.FindText(HObject image, HTuple textModel, out HTuple textResultID)

HTextResult HImage.FindText(HTextModel textModel)

HTextResult HTextModel.FindText(HImage image)

public HTextResult(HImage image, HTextModel textModel)

void HTextResult.FindText(HImage image, HTextModel textModel)

Description

find_textfind_textfind_textFindTextFindText segments text specified by TextModelTextModelTextModelTextModeltextModel in ImageImageImageImageimage and returns the result in TextResultIDTextResultIDTextResultIDTextResultIDtextResultID. Specific results of TextResultIDTextResultIDTextResultIDTextResultIDtextResultID can be obtained by get_text_resultget_text_resultget_text_resultGetTextResultGetTextResult and get_text_objectget_text_objectget_text_objectGetTextObjectGetTextObject.

find_textfind_textfind_textFindTextFindText segments only text which is roughly horizontally aligned in the input image. text_line_orientationtext_line_orientationtext_line_orientationTextLineOrientationTextLineOrientation and rotate_imagerotate_imagerotate_imageRotateImageRotateImage can be used to achieve this alignment.

The input image is preprocessed such that character like structures are enhanced. On this image find_textfind_textfind_textFindTextFindText 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. If TextModelTextModelTextModelTextModeltextModel contains 'text_line_structure'"text_line_structure""text_line_structure""text_line_structure""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_paramset_text_model_paramset_text_model_paramSetTextModelParamSetTextModelParam.

Parallelization

Parameters

ImageImageImageImageimage (input_object)  image objectHImageHImageHImageXHobject (byte / uint2)

Input image.

TextModelTextModelTextModelTextModeltextModel (input_control)  text_model HTextModel, HTupleHTextModel, HTupleHTextModelX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Text model specifying the text to be segmented.

TextResultIDTextResultIDTextResultIDTextResultIDtextResultID (output_control)  text_result HTextResult, HTupleHTextResult, HTupleHTextResultX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Result of the segmentation.

Result

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

Possible Predecessors

create_text_modelcreate_text_modelcreate_text_modelCreateTextModelCreateTextModel, set_text_model_paramset_text_model_paramset_text_model_paramSetTextModelParamSetTextModelParam, text_line_orientationtext_line_orientationtext_line_orientationTextLineOrientationTextLineOrientation, text_line_slanttext_line_slanttext_line_slantTextLineSlantTextLineSlant

Possible Successors

get_text_resultget_text_resultget_text_resultGetTextResultGetTextResult, get_text_objectget_text_objectget_text_objectGetTextObjectGetTextObject

Module

Foundation


Table of Contents / OCR / Segmentation ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH