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

write_ocr_trainf_imagewrite_ocr_trainf_imagewrite_ocr_trainf_imageWriteOcrTrainfImageWriteOcrTrainfImage (Operator)

Name

write_ocr_trainf_imagewrite_ocr_trainf_imagewrite_ocr_trainf_imageWriteOcrTrainfImageWriteOcrTrainfImage — Write characters into a training file.

Signature

write_ocr_trainf_image(Character : : Class, FileName : )

Herror write_ocr_trainf_image(const Hobject Character, const char* Class, const char* FileName)

Herror T_write_ocr_trainf_image(const Hobject Character, const Htuple Class, const Htuple FileName)

Herror write_ocr_trainf_image(Hobject Character, const HTuple& Class, const HTuple& FileName)

void HImage::WriteOcrTrainfImage(const HTuple& Class, const HTuple& FileName) const

void HImageArray::WriteOcrTrainfImage(const HTuple& Class, const HTuple& FileName) const

void HOperatorSetX.WriteOcrTrainfImage(
[in] IHUntypedObjectX* Character, [in] VARIANT Class, [in] VARIANT FileName)

void HImageX.WriteOcrTrainfImage(
[in] VARIANT Class, [in] BSTR FileName)

static void HOperatorSet.WriteOcrTrainfImage(HObject character, HTuple classVal, HTuple fileName)

void HImage.WriteOcrTrainfImage(HTuple classVal, string fileName)

void HImage.WriteOcrTrainfImage(string classVal, string fileName)

Description

The operator write_ocr_trainf_imagewrite_ocr_trainf_imagewrite_ocr_trainf_imageWriteOcrTrainfImageWriteOcrTrainfImage is used to prepare the training with the operator trainf_ocr_class_mlptrainf_ocr_class_mlptrainf_ocr_class_mlpTrainfOcrClassMlpTrainfOcrClassMlp, trainf_ocr_class_svmtrainf_ocr_class_svmtrainf_ocr_class_svmTrainfOcrClassSvmTrainfOcrClassSvm, or trainf_ocr_class_boxtrainf_ocr_class_boxtrainf_ocr_class_boxTrainfOcrClassBoxTrainfOcrClassBox. 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 CharacterCharacterCharacterCharactercharacter the corresponding class name must be specified in ClassClassClassClassclassVal. If no file extension is specified in FileNameFileNameFileNameFileNamefileName the extension '.trf' is appended to the file name. In contrast to write_ocr_trainfwrite_ocr_trainfwrite_ocr_trainfWriteOcrTrainfWriteOcrTrainf one image per character is passed. The domain of this image defines the pixels which belong to the character. The file format can be defined by the parameter 'ocr_trainf_version'"ocr_trainf_version""ocr_trainf_version""ocr_trainf_version""ocr_trainf_version" of the operator set_systemset_systemset_systemSetSystemSetSystem.

Parallelization

Parameters

CharacterCharacterCharacterCharactercharacter (input_object)  image(-array) objectHImageHImageHImageXHobject (byte / uint2)

Characters to be trained.

ClassClassClassClassclassVal (input_control)  string(-array) HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Class (name) of the characters.

FileNameFileNameFileNameFileNamefileName (input_control)  filename.write HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Name of the training file.

Default value: 'train_ocr' "train_ocr" "train_ocr" "train_ocr" "train_ocr"

File extension: .trf

Result

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

Possible Predecessors

thresholdthresholdthresholdThresholdThreshold, connectionconnectionconnectionConnectionConnection, create_ocr_class_boxcreate_ocr_class_boxcreate_ocr_class_boxCreateOcrClassBoxCreateOcrClassBox, read_ocrread_ocrread_ocrReadOcrReadOcr

Possible Successors

trainf_ocr_class_mlptrainf_ocr_class_mlptrainf_ocr_class_mlpTrainfOcrClassMlpTrainfOcrClassMlp, trainf_ocr_class_svmtrainf_ocr_class_svmtrainf_ocr_class_svmTrainfOcrClassSvmTrainfOcrClassSvm, trainf_ocr_class_boxtrainf_ocr_class_boxtrainf_ocr_class_boxTrainfOcrClassBoxTrainfOcrClassBox, info_ocr_class_boxinfo_ocr_class_boxinfo_ocr_class_boxInfoOcrClassBoxInfoOcrClassBox, write_ocrwrite_ocrwrite_ocrWriteOcrWriteOcr, do_ocr_multido_ocr_multido_ocr_multiDoOcrMultiDoOcrMulti, do_ocr_singledo_ocr_singledo_ocr_singleDoOcrSingleDoOcrSingle

Alternatives

write_ocr_trainfwrite_ocr_trainfwrite_ocr_trainfWriteOcrTrainfWriteOcrTrainf, append_ocr_trainfappend_ocr_trainfappend_ocr_trainfAppendOcrTrainfAppendOcrTrainf

Module

OCR/OCV


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