read_ocr_trainfT_read_ocr_trainfReadOcrTrainfReadOcrTrainfread_ocr_trainf (算子名称)
名称
read_ocr_trainfT_read_ocr_trainfReadOcrTrainfReadOcrTrainfread_ocr_trainf
— Read training characters from files and convert to images.
参数签名
def read_ocr_trainf(training_file: MaybeSequence[str]) -> Tuple[HObject, Sequence[str]]
描述
read_ocr_trainfread_ocr_trainfReadOcrTrainfReadOcrTrainfReadOcrTrainfread_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_trainfWriteOcrTrainfWriteOcrTrainfWriteOcrTrainfwrite_ocr_trainf
). The
names of the characters are returned in CharacterNamesCharacterNamesCharacterNamesCharacterNamescharacterNamescharacter_names
. If more
than one file name is given the files are processed in the order of the file
names.
运行信息
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
参数表
CharactersCharactersCharactersCharacterscharacterscharacters
(output_object) image-array →
objectHImageHObjectHImageHobject * (byte / uint2)
Images read from file.
TrainingFileTrainingFileTrainingFileTrainingFiletrainingFiletraining_file
(input_control) filename.read(-array) →
HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Names of the training files.
Default:
''
""
""
""
""
""
File extension:
.trf
, .otr
CharacterNamesCharacterNamesCharacterNamesCharacterNamescharacterNamescharacter_names
(output_control) string-array →
HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Names of the read characters.
结果
If the parameter values are correct the operator
read_ocr_trainfread_ocr_trainfReadOcrTrainfReadOcrTrainfReadOcrTrainfread_ocr_trainf
returns the value 2 (
H_MSG_TRUE)
.
Otherwise an exception is raised.
可能的前置算子
write_ocr_trainfwrite_ocr_trainfWriteOcrTrainfWriteOcrTrainfWriteOcrTrainfwrite_ocr_trainf
可能的后置算子
disp_imagedisp_imageDispImageDispImageDispImagedisp_image
,
select_objselect_objSelectObjSelectObjSelectObjselect_obj
,
zoom_image_sizezoom_image_sizeZoomImageSizeZoomImageSizeZoomImageSizezoom_image_size
可替代算子
read_ocr_trainf_selectread_ocr_trainf_selectReadOcrTrainfSelectReadOcrTrainfSelectReadOcrTrainfSelectread_ocr_trainf_select
模块
OCR/OCV