read_ocr_class_cnnT_read_ocr_class_cnnReadOcrClassCnnReadOcrClassCnn (Operator)
Name
read_ocr_class_cnnT_read_ocr_class_cnnReadOcrClassCnnReadOcrClassCnn
— Read an CNN-based OCR classifier from a file.
Signature
Description
read_ocr_class_cnnread_ocr_class_cnnReadOcrClassCnnReadOcrClassCnnReadOcrClassCnn
reads a pretrained OCR classifier based on a
convolutional neural network (CNN).
The CNN-based OCR classifier is read with read_ocr_class_cnnread_ocr_class_cnnReadOcrClassCnnReadOcrClassCnnReadOcrClassCnn
and
subsequently used for classification with either
do_ocr_single_class_cnndo_ocr_single_class_cnnDoOcrSingleClassCnnDoOcrSingleClassCnnDoOcrSingleClassCnn
, do_ocr_multi_class_cnndo_ocr_multi_class_cnnDoOcrMultiClassCnnDoOcrMultiClassCnnDoOcrMultiClassCnn
, or
do_ocr_word_cnndo_ocr_word_cnnDoOcrWordCnnDoOcrWordCnnDoOcrWordCnn
.
HALCON provides a number of pretrained OCR classifiers (see
“Solution Guide I”
, chapter 'OCR', section 'Pretrained OCR
Fonts'). These pretrained OCR
classifiers make it possible to read a wide variety of different fonts
without the need to train an OCR classifier. Note that the pretrained OCR
classifiers were trained with symbols that are printed dark on light.
Execution Information
- 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.
Parameters
FileNameFileNameFileNameFileNamefileName
(input_control) filename.read →
HTupleHTupleHtuple (string) (string) (HString) (char*)
File name.
Default value:
'Universal_Rej.occ'
"Universal_Rej.occ"
"Universal_Rej.occ"
"Universal_Rej.occ"
"Universal_Rej.occ"
Suggested values: 'Universal_NoRej.occ'"Universal_NoRej.occ""Universal_NoRej.occ""Universal_NoRej.occ""Universal_NoRej.occ", 'Universal_Rej.occ'"Universal_Rej.occ""Universal_Rej.occ""Universal_Rej.occ""Universal_Rej.occ", 'Universal_0-9_NoRej.occ'"Universal_0-9_NoRej.occ""Universal_0-9_NoRej.occ""Universal_0-9_NoRej.occ""Universal_0-9_NoRej.occ", 'Universal_0-9_Rej.occ'"Universal_0-9_Rej.occ""Universal_0-9_Rej.occ""Universal_0-9_Rej.occ""Universal_0-9_Rej.occ", 'Universal_0-9+_NoRej.occ'"Universal_0-9+_NoRej.occ""Universal_0-9+_NoRej.occ""Universal_0-9+_NoRej.occ""Universal_0-9+_NoRej.occ", 'Universal_0-9+_Rej.occ'"Universal_0-9+_Rej.occ""Universal_0-9+_Rej.occ""Universal_0-9+_Rej.occ""Universal_0-9+_Rej.occ", 'Universal_0-9A-Z_NoRej.occ'"Universal_0-9A-Z_NoRej.occ""Universal_0-9A-Z_NoRej.occ""Universal_0-9A-Z_NoRej.occ""Universal_0-9A-Z_NoRej.occ", 'Universal_0-9A-Z_Rej.occ'"Universal_0-9A-Z_Rej.occ""Universal_0-9A-Z_Rej.occ""Universal_0-9A-Z_Rej.occ""Universal_0-9A-Z_Rej.occ", 'Universal_0-9A-Z+_NoRej.occ'"Universal_0-9A-Z+_NoRej.occ""Universal_0-9A-Z+_NoRej.occ""Universal_0-9A-Z+_NoRej.occ""Universal_0-9A-Z+_NoRej.occ", 'Universal_0-9A-Z+_Rej.occ'"Universal_0-9A-Z+_Rej.occ""Universal_0-9A-Z+_Rej.occ""Universal_0-9A-Z+_Rej.occ""Universal_0-9A-Z+_Rej.occ", 'Universal_A-Z+_NoRej.occ'"Universal_A-Z+_NoRej.occ""Universal_A-Z+_NoRej.occ""Universal_A-Z+_NoRej.occ""Universal_A-Z+_NoRej.occ", 'Universal_A-Z+_Rej.occ'"Universal_A-Z+_Rej.occ""Universal_A-Z+_Rej.occ""Universal_A-Z+_Rej.occ""Universal_A-Z+_Rej.occ"
File extension: .occ
, .fnt
OCRHandleOCRHandleOCRHandleOCRHandleOCRHandle
(output_control) ocr_cnn →
HOCRCnn, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the OCR classifier.
Result
If the parameters are valid, the operator read_ocr_class_cnnread_ocr_class_cnnReadOcrClassCnnReadOcrClassCnnReadOcrClassCnn
returns the value 2 (H_MSG_TRUE). If necessary, an exception is
raised.
Possible Successors
do_ocr_single_class_cnndo_ocr_single_class_cnnDoOcrSingleClassCnnDoOcrSingleClassCnnDoOcrSingleClassCnn
,
do_ocr_multi_class_cnndo_ocr_multi_class_cnnDoOcrMultiClassCnnDoOcrMultiClassCnnDoOcrMultiClassCnn
,
do_ocr_word_cnndo_ocr_word_cnnDoOcrWordCnnDoOcrWordCnnDoOcrWordCnn
See also
get_params_ocr_class_cnnget_params_ocr_class_cnnGetParamsOcrClassCnnGetParamsOcrClassCnnGetParamsOcrClassCnn
Module
OCR/OCV