read_ocr_trainf_names_protectedread_ocr_trainf_names_protectedReadOcrTrainfNamesProtectedReadOcrTrainfNamesProtectedread_ocr_trainf_names_protected (算子)
名称
read_ocr_trainf_names_protectedread_ocr_trainf_names_protectedReadOcrTrainfNamesProtectedReadOcrTrainfNamesProtectedread_ocr_trainf_names_protected — 查询哪些字符存储在(受保护的)训练文件中。
签名
void ReadOcrTrainfNamesProtected(const HTuple& TrainingFile, const HTuple& Password, HTuple* CharacterNames, HTuple* CharacterCount)
static HTuple HMisc::ReadOcrTrainfNamesProtected(const HTuple& TrainingFile, const HTuple& Password, HTuple* CharacterCount)
static HString HMisc::ReadOcrTrainfNamesProtected(const HString& TrainingFile, const HString& Password, Hlong* CharacterCount)
static HString HMisc::ReadOcrTrainfNamesProtected(const char* TrainingFile, const char* Password, Hlong* CharacterCount)
static HString HMisc::ReadOcrTrainfNamesProtected(const wchar_t* TrainingFile, const wchar_t* Password, Hlong* CharacterCount)
(
Windows only)
def read_ocr_trainf_names_protected(training_file: MaybeSequence[str], password: MaybeSequence[str]) -> Tuple[Sequence[str], Sequence[int]]
def read_ocr_trainf_names_protected_s(training_file: MaybeSequence[str], password: MaybeSequence[str]) -> Tuple[str, int]
描述
read_ocr_trainf_names_protectedread_ocr_trainf_names_protectedReadOcrTrainfNamesProtectedReadOcrTrainfNamesProtectedReadOcrTrainfNamesProtectedread_ocr_trainf_names_protected extracts the names and frequency
of all characters in the specified training files. Its functionality
corresponds to the functionality of read_ocr_trainf_namesread_ocr_trainf_namesReadOcrTrainfNamesReadOcrTrainfNamesReadOcrTrainfNamesread_ocr_trainf_names,
with the addition that read_ocr_trainf_names_protectedread_ocr_trainf_names_protectedReadOcrTrainfNamesProtectedReadOcrTrainfNamesProtectedReadOcrTrainfNamesProtectedread_ocr_trainf_names_protected
can process unprotected and protected training files. Protected
training files can be used only with the correct user password
PasswordPasswordPasswordPasswordpasswordpassword. If the number of passwords PasswordPasswordPasswordPasswordpasswordpassword
equals 1, then every input file TrainingFileTrainingFileTrainingFileTrainingFiletrainingFiletraining_file is checked
with that password, otherwise the number of passwords has to be
equal to the number of input files and the input file at position
n is checked with the password at position n. For unprotected
training files the passwords are ignored.
For a more detailed description of the operator's functionality see
read_ocr_trainf_namesread_ocr_trainf_namesReadOcrTrainfNamesReadOcrTrainfNamesReadOcrTrainfNamesread_ocr_trainf_names。The concept of protecting OCR training
data in HALCON is described in protect_ocr_trainfprotect_ocr_trainfProtectOcrTrainfProtectOcrTrainfProtectOcrTrainfprotect_ocr_trainf。
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
TrainingFileTrainingFileTrainingFileTrainingFiletrainingFiletraining_file (输入控制) filename.read(-array) → HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Names of the training files.
默认值:
''
""
""
""
""
""
File extension:
.trf, .otr
PasswordPasswordPasswordPasswordpasswordpassword (输入控制) string(-array) → HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Passwords for protected training files.
CharacterNamesCharacterNamesCharacterNamesCharacterNamescharacterNamescharacter_names (输出控制) string(-array) → HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Names of the read characters.
CharacterCountCharacterCountCharacterCountCharacterCountcharacterCountcharacter_count (输出控制) integer(-array) → HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Number of characters.
结果
如果参数值正确,算子 read_ocr_trainf_names_protectedread_ocr_trainf_names_protectedReadOcrTrainfNamesProtectedReadOcrTrainfNamesProtectedReadOcrTrainfNamesProtectedread_ocr_trainf_names_protected 返回值 2 ( H_MSG_TRUE )。否则将抛出异常。
可能的前趋
protect_ocr_trainfprotect_ocr_trainfProtectOcrTrainfProtectOcrTrainfProtectOcrTrainfprotect_ocr_trainf
另见
read_ocr_trainf_namesread_ocr_trainf_namesReadOcrTrainfNamesReadOcrTrainfNamesReadOcrTrainfNamesread_ocr_trainf_names
模块
光学字符识别/光学字符验证