read_ocr_trainfT_read_ocr_trainfReadOcrTrainfReadOcrTrainfread_ocr_trainf (Operator)

Name

read_ocr_trainfT_read_ocr_trainfReadOcrTrainfReadOcrTrainfread_ocr_trainf — Read training characters from files and convert to images.

Signature

read_ocr_trainf( : Characters : TrainingFile : CharacterNames)

Herror T_read_ocr_trainf(Hobject* Characters, const Htuple TrainingFile, Htuple* CharacterNames)

void ReadOcrTrainf(HObject* Characters, const HTuple& TrainingFile, HTuple* CharacterNames)

HTuple HImage::ReadOcrTrainf(const HTuple& TrainingFile)

HTuple HImage::ReadOcrTrainf(const HString& TrainingFile)

HTuple HImage::ReadOcrTrainf(const char* TrainingFile)

HTuple HImage::ReadOcrTrainf(const wchar_t* TrainingFile)   ( Windows only)

static void HOperatorSet.ReadOcrTrainf(out HObject characters, HTuple trainingFile, out HTuple characterNames)

HTuple HImage.ReadOcrTrainf(HTuple trainingFile)

HTuple HImage.ReadOcrTrainf(string trainingFile)

def read_ocr_trainf(training_file: MaybeSequence[str]) -> Tuple[HObject, Sequence[str]]

Description

read_ocr_trainfread_ocr_trainfReadOcrTrainfReadOcrTrainfread_ocr_trainf reads all characters from the specified file names and converts them into images. The default HALCON file extension for the OCR training file is 'trf'. The domain is defined according to the foreground of the characters (as specified in write_ocr_trainfwrite_ocr_trainfWriteOcrTrainfWriteOcrTrainfwrite_ocr_trainf). The names of the characters are returned in CharacterNamesCharacterNamesCharacterNamescharacterNamescharacter_names. If more than one file name is given the files are processed in the order of the file names.

Execution Information

Parameters

CharactersCharactersCharacterscharacterscharacters (output_object)  image-array objectHImageHObjectHObjectHobject * (byte / uint2)

Images read from file.

TrainingFileTrainingFileTrainingFiletrainingFiletraining_file (input_control)  filename.read(-array) HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Names of the training files.

Default: '' "" "" "" ""

File extension: .trf, .otr

CharacterNamesCharacterNamesCharacterNamescharacterNamescharacter_names (output_control)  string-array HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Names of the read characters.

Result

If the parameter values are correct the operator read_ocr_trainfread_ocr_trainfReadOcrTrainfReadOcrTrainfread_ocr_trainf returns the value 2 ( H_MSG_TRUE) . Otherwise an exception is raised.

Possible Predecessors

write_ocr_trainfwrite_ocr_trainfWriteOcrTrainfWriteOcrTrainfwrite_ocr_trainf

Possible Successors

disp_imagedisp_imageDispImageDispImagedisp_image, select_objselect_objSelectObjSelectObjselect_obj, zoom_image_sizezoom_image_sizeZoomImageSizeZoomImageSizezoom_image_size

Alternatives

read_ocr_trainf_selectread_ocr_trainf_selectReadOcrTrainfSelectReadOcrTrainfSelectread_ocr_trainf_select

Module

OCR/OCV