do_ocr_single_class_svmT_do_ocr_single_class_svmDoOcrSingleClassSvmDoOcrSingleClassSvmdo_ocr_single_class_svm (Operator)
Name
do_ocr_single_class_svmT_do_ocr_single_class_svmDoOcrSingleClassSvmDoOcrSingleClassSvmdo_ocr_single_class_svm
— Classify a single character with an SVM-based OCR classifier.
Signature
Description
do_ocr_single_class_svmdo_ocr_single_class_svmDoOcrSingleClassSvmDoOcrSingleClassSvmDoOcrSingleClassSvmdo_ocr_single_class_svm
computes the best NumNumNumNumnumnum
classes of the character given by the region CharacterCharacterCharacterCharactercharactercharacter
and
the gray values ImageImageImageImageimageimage
with the OCR classifier
OCRHandleOCRHandleOCRHandleOCRHandleOCRHandleocrhandle
and returns the classes in ClassClassClassClassclassValclass
.
Because multiple classes may be returned by
do_ocr_single_class_svmdo_ocr_single_class_svmDoOcrSingleClassSvmDoOcrSingleClassSvmDoOcrSingleClassSvmdo_ocr_single_class_svm
, CharacterCharacterCharacterCharactercharactercharacter
may only contain
a single region (a single character). If multiple characters should
be classified in a single call, do_ocr_multi_class_svmdo_ocr_multi_class_svmDoOcrMultiClassSvmDoOcrMultiClassSvmDoOcrMultiClassSvmdo_ocr_multi_class_svm
must
be used. Before calling do_ocr_single_class_svmdo_ocr_single_class_svmDoOcrSingleClassSvmDoOcrSingleClassSvmDoOcrSingleClassSvmdo_ocr_single_class_svm
, the
classifier must be trained with trainf_ocr_class_svmtrainf_ocr_class_svmTrainfOcrClassSvmTrainfOcrClassSvmTrainfOcrClassSvmtrainf_ocr_class_svm
.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
CharacterCharacterCharacterCharactercharactercharacter
(input_object) region →
objectHRegionHObjectHRegionHobject
Character to be recognized.
ImageImageImageImageimageimage
(input_object) singlechannelimage →
objectHImageHObjectHImageHobject (byte / uint2)
Gray values of the character.
OCRHandleOCRHandleOCRHandleOCRHandleOCRHandleocrhandle
(input_control) ocr_svm →
HOCRSvm, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the OCR classifier.
NumNumNumNumnumnum
(input_control) integer-array →
HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Number of best classes to determine.
Default value: 1
Suggested values: 1, 2, 3, 4, 5
ClassClassClassClassclassValclass
(output_control) string(-array) →
HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Result of classifying the character with the
SVM.
Result
If the parameters are valid the operator
do_ocr_single_class_svmdo_ocr_single_class_svmDoOcrSingleClassSvmDoOcrSingleClassSvmDoOcrSingleClassSvmdo_ocr_single_class_svm
returns the value 2 (H_MSG_TRUE). If
necessary, an exception is raised.
Possible Predecessors
trainf_ocr_class_svmtrainf_ocr_class_svmTrainfOcrClassSvmTrainfOcrClassSvmTrainfOcrClassSvmtrainf_ocr_class_svm
,
read_ocr_class_svmread_ocr_class_svmReadOcrClassSvmReadOcrClassSvmReadOcrClassSvmread_ocr_class_svm
Alternatives
do_ocr_multi_class_svmdo_ocr_multi_class_svmDoOcrMultiClassSvmDoOcrMultiClassSvmDoOcrMultiClassSvmdo_ocr_multi_class_svm
See also
create_ocr_class_svmcreate_ocr_class_svmCreateOcrClassSvmCreateOcrClassSvmCreateOcrClassSvmcreate_ocr_class_svm
,
classify_class_svmclassify_class_svmClassifyClassSvmClassifyClassSvmClassifyClassSvmclassify_class_svm
Module
OCR/OCV