do_ocr_multi_class_svmT_do_ocr_multi_class_svmDoOcrMultiClassSvmDoOcrMultiClassSvmdo_ocr_multi_class_svm (Operator)

Name

do_ocr_multi_class_svmT_do_ocr_multi_class_svmDoOcrMultiClassSvmDoOcrMultiClassSvmdo_ocr_multi_class_svm — Classify multiple characters with an SVM-based OCR classifier.

Signature

do_ocr_multi_class_svm(Character, Image : : OCRHandle : Class)

Herror T_do_ocr_multi_class_svm(const Hobject Character, const Hobject Image, const Htuple OCRHandle, Htuple* Class)

void DoOcrMultiClassSvm(const HObject& Character, const HObject& Image, const HTuple& OCRHandle, HTuple* Class)

HTuple HRegion::DoOcrMultiClassSvm(const HImage& Image, const HOCRSvm& OCRHandle) const

HTuple HOCRSvm::DoOcrMultiClassSvm(const HRegion& Character, const HImage& Image) const

static void HOperatorSet.DoOcrMultiClassSvm(HObject character, HObject image, HTuple OCRHandle, out HTuple classVal)

HTuple HRegion.DoOcrMultiClassSvm(HImage image, HOCRSvm OCRHandle)

HTuple HOCRSvm.DoOcrMultiClassSvm(HRegion character, HImage image)

def do_ocr_multi_class_svm(character: HObject, image: HObject, ocrhandle: HHandle) -> Sequence[str]

def do_ocr_multi_class_svm_s(character: HObject, image: HObject, ocrhandle: HHandle) -> str

Description

do_ocr_multi_class_svmdo_ocr_multi_class_svmDoOcrMultiClassSvmDoOcrMultiClassSvmDoOcrMultiClassSvmdo_ocr_multi_class_svm computes the best class for each of the characters given by the regions CharacterCharacterCharacterCharactercharactercharacter and the gray values ImageImageImageImageimageimage with the SVM-based OCR classifier OCRHandleOCRHandleOCRHandleOCRHandleOCRHandleocrhandle and returns the classes in ClassClassClassClassclassValclass. In contrast to do_ocr_single_class_svmdo_ocr_single_class_svmDoOcrSingleClassSvmDoOcrSingleClassSvmDoOcrSingleClassSvmdo_ocr_single_class_svm, do_ocr_multi_class_svmdo_ocr_multi_class_svmDoOcrMultiClassSvmDoOcrMultiClassSvmDoOcrMultiClassSvmdo_ocr_multi_class_svm can classify multiple characters in one call, and therefore typically is faster than a loop that uses do_ocr_single_class_svmdo_ocr_single_class_svmDoOcrSingleClassSvmDoOcrSingleClassSvmDoOcrSingleClassSvmdo_ocr_single_class_svm to classify single characters. However, do_ocr_multi_class_svmdo_ocr_multi_class_svmDoOcrMultiClassSvmDoOcrMultiClassSvmDoOcrMultiClassSvmdo_ocr_multi_class_svm can only return the best class of each character. Before calling do_ocr_multi_class_svmdo_ocr_multi_class_svmDoOcrMultiClassSvmDoOcrMultiClassSvmDoOcrMultiClassSvmdo_ocr_multi_class_svm, the classifier must be trained with trainf_ocr_class_svmtrainf_ocr_class_svmTrainfOcrClassSvmTrainfOcrClassSvmTrainfOcrClassSvmtrainf_ocr_class_svm.

Execution Information

Parameters

CharacterCharacterCharacterCharactercharactercharacter (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Characters to be recognized.

ImageImageImageImageimageimage (input_object)  singlechannelimage objectHImageHObjectHImageHobject (byte / uint2)

Gray values of the characters.

OCRHandleOCRHandleOCRHandleOCRHandleOCRHandleocrhandle (input_control)  ocr_svm HOCRSvm, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the OCR classifier.

ClassClassClassClassclassValclass (output_control)  string(-array) HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Result of classifying the characters with the SVM.

Result

If the parameters are valid the operator do_ocr_multi_class_svmdo_ocr_multi_class_svmDoOcrMultiClassSvmDoOcrMultiClassSvmDoOcrMultiClassSvmdo_ocr_multi_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_single_class_svmdo_ocr_single_class_svmDoOcrSingleClassSvmDoOcrSingleClassSvmDoOcrSingleClassSvmdo_ocr_single_class_svm

See also

create_ocr_class_svmcreate_ocr_class_svmCreateOcrClassSvmCreateOcrClassSvmCreateOcrClassSvmcreate_ocr_class_svm, classify_class_svmclassify_class_svmClassifyClassSvmClassifyClassSvmClassifyClassSvmclassify_class_svm

Module

OCR/OCV