create_lexiconT_create_lexiconCreateLexiconCreateLexiconcreate_lexicon (算子名称)
名称
create_lexiconT_create_lexiconCreateLexiconCreateLexiconcreate_lexicon
— Create a lexicon from a tuple of words.
参数签名
def create_lexicon(name: str, words: Sequence[str]) -> HHandle
描述
create_lexiconcreate_lexiconCreateLexiconCreateLexiconCreateLexiconcreate_lexicon
creates a new lexicon based on a tuple of
WordsWordsWordsWordswordswords
. By specifying a unique textual NameNameNameNamenamename
, you
can later refer to the lexicon from syntax expressions like those
used, e.g., by do_ocr_word_mlpdo_ocr_word_mlpDoOcrWordMlpDoOcrWordMlpDoOcrWordMlpdo_ocr_word_mlp
.
Note that lexicon support in HALCON is currently not aimed at
natural languages. Rather, it is intended as a post-processing
step in OCR applications that only need to distinguish between
a limited set of not more than a few thousand valid words, e.g.,
country or product names. MVTec itself does not provide any lexica.
运行信息
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.
参数表
NameNameNameNamenamename
(input_control) string →
HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Unique name for the new lexicon.
Default:
'lex1'
"lex1"
"lex1"
"lex1"
"lex1"
"lex1"
WordsWordsWordsWordswordswords
(input_control) string-array →
HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Word list for the new lexicon.
Default:
['word1','word2','word3']
["word1","word2","word3"]
["word1","word2","word3"]
["word1","word2","word3"]
["word1","word2","word3"]
["word1","word2","word3"]
LexiconHandleLexiconHandleLexiconHandleLexiconHandlelexiconHandlelexicon_handle
(output_control) lexicon →
HLexicon, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the lexicon.
可能的后置算子
do_ocr_word_mlpdo_ocr_word_mlpDoOcrWordMlpDoOcrWordMlpDoOcrWordMlpdo_ocr_word_mlp
,
do_ocr_word_svmdo_ocr_word_svmDoOcrWordSvmDoOcrWordSvmDoOcrWordSvmdo_ocr_word_svm
可替代算子
import_lexiconimport_lexiconImportLexiconImportLexiconImportLexiconimport_lexicon
参考其它
lookup_lexiconlookup_lexiconLookupLexiconLookupLexiconLookupLexiconlookup_lexicon
,
suggest_lexiconsuggest_lexiconSuggestLexiconSuggestLexiconSuggestLexiconsuggest_lexicon
模块
OCR/OCV