HALCON Reference Manual / OCR / Training-Files Operators

write_ocr_trainf (Operator)

Name

write_ocr_trainf — Storing of trained characters into a file.

Synopsis

write_ocr_trainf(Character, Image : : Class, FileName : )

Description

The operator write_ocr_trainf serves to prepare the training with the operator trainf_ocr_class_mlp, trainf_ocr_class_svm, or trainf_ocr_class_box. Hereby regions, representing characters, including their gray values (region and pixel) and the corresponding class name will be written into a file. An arbitrary number of regions within one image is supported. For each character (region) in Character the corresponding class name must be specified in Class. The gray values are passed via the parameter Image. If no file extension is specified in FileName the extension '.trf' is appended to the file name. The version of the file format used for writing data can be defined by the parameter 'ocr_trainf_version' of the operator set_system.

Parameters

Character (input_object) region(-array) object
Characters to be trained.

Image (input_object) image object (byte / uint2)
Gray values of the characters.

Class (input_control) string(-array) (string)
Class (name) of the characters.

FileName (input_control) filename.write (string)
Name of the training file.
Default value: 'train_ocr'
File extension: .trf

Result

If the parameters are correct, the operator write_ocr_trainf returns the value 2 (H_MSG_TRUE). Otherwise an exception will be raised.

Parallelization Information

write_ocr_trainf is reentrant and processed without parallelization.

Possible Predecessors

threshold, connection, create_ocr_class_box, read_ocr

Possible Successors

trainf_ocr_class_mlp, trainf_ocr_class_svm, trainf_ocr_class_box, info_ocr_class_box, write_ocr, do_ocr_multi, do_ocr_single

Module

OCR/OCV


HALCON Reference Manual / OCR / Training-Files Operators
Version 9.0.2 Copyright © 1996-2010 MVTec Software GmbH