write_ocr_trainf_imagewrite_ocr_trainf_imageWriteOcrTrainfImageWriteOcrTrainfImagewrite_ocr_trainf_image (算子)
名称
write_ocr_trainf_imagewrite_ocr_trainf_imageWriteOcrTrainfImageWriteOcrTrainfImagewrite_ocr_trainf_image — 将字符写入训练文件。
签名
描述
算子 write_ocr_trainf_imagewrite_ocr_trainf_imageWriteOcrTrainfImageWriteOcrTrainfImageWriteOcrTrainfImagewrite_ocr_trainf_image is used to prepare the
training with the operator trainf_ocr_class_mlptrainf_ocr_class_mlpTrainfOcrClassMlpTrainfOcrClassMlpTrainfOcrClassMlptrainf_ocr_class_mlp or
trainf_ocr_class_svmtrainf_ocr_class_svmTrainfOcrClassSvmTrainfOcrClassSvmTrainfOcrClassSvmtrainf_ocr_class_svm。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 CharacterCharacterCharacterCharactercharactercharacter the
corresponding class name must be specified in ClassClassClassClassclassValclass. If no
file extension is specified in TrainingFileTrainingFileTrainingFileTrainingFiletrainingFiletraining_file the extension '.trf'
is appended to the file name. In contrast to
write_ocr_trainfwrite_ocr_trainfWriteOcrTrainfWriteOcrTrainfWriteOcrTrainfwrite_ocr_trainf 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""ocr_trainf_version" of the operator set_systemset_systemSetSystemSetSystemSetSystemset_system。
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
CharacterCharacterCharacterCharactercharactercharacter (输入对象) singlechannelimage(-array) → objectHImageHObjectHImageHobject (byte / uint2)
待训练的字符。
ClassClassClassClassclassValclass (输入控制) string(-array) → HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)
字符的类(名称)。
TrainingFileTrainingFileTrainingFileTrainingFiletrainingFiletraining_file (输入控制) filename.write → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
训练文件的名称。
默认值:
'train_ocr'
"train_ocr"
"train_ocr"
"train_ocr"
"train_ocr"
"train_ocr"
File extension:
.trf
结果
如果参数正确,算子
write_ocr_trainf_imagewrite_ocr_trainf_imageWriteOcrTrainfImageWriteOcrTrainfImageWriteOcrTrainfImagewrite_ocr_trainf_image 返回值 2 ( H_MSG_TRUE )。否则将抛出异常。
可能的前趋
thresholdthresholdThresholdThresholdThresholdthreshold,
connectionconnectionConnectionConnectionConnectionconnection,
read_ocr_trainfread_ocr_trainfReadOcrTrainfReadOcrTrainfReadOcrTrainfread_ocr_trainf
可能的后继
trainf_ocr_class_mlptrainf_ocr_class_mlpTrainfOcrClassMlpTrainfOcrClassMlpTrainfOcrClassMlptrainf_ocr_class_mlp,
trainf_ocr_class_svmtrainf_ocr_class_svmTrainfOcrClassSvmTrainfOcrClassSvmTrainfOcrClassSvmtrainf_ocr_class_svm
替代
write_ocr_trainfwrite_ocr_trainfWriteOcrTrainfWriteOcrTrainfWriteOcrTrainfwrite_ocr_trainf,
append_ocr_trainfappend_ocr_trainfAppendOcrTrainfAppendOcrTrainfAppendOcrTrainfappend_ocr_trainf
模块
光学字符识别/光学字符验证