ClassesClasses | | Operators

do_ocr_single_class_svmT_do_ocr_single_class_svmDoOcrSingleClassSvmDoOcrSingleClassSvm (Operator)

Name

do_ocr_single_class_svmT_do_ocr_single_class_svmDoOcrSingleClassSvmDoOcrSingleClassSvm — Classify a single character with an SVM-based OCR classifier.

Signature

do_ocr_single_class_svm(Character, Image : : OCRHandle, Num : Class)

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

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

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

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

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

HTuple HRegion.DoOcrSingleClassSvm(HImage image, HOCRSvm OCRHandle, HTuple num)

HTuple HOCRSvm.DoOcrSingleClassSvm(HRegion character, HImage image, HTuple num)

Description

do_ocr_single_class_svmdo_ocr_single_class_svmDoOcrSingleClassSvmDoOcrSingleClassSvmDoOcrSingleClassSvm computes the best NumNumNumNumnum classes of the character given by the region CharacterCharacterCharacterCharactercharacter and the gray values ImageImageImageImageimage with the OCR classifier OCRHandleOCRHandleOCRHandleOCRHandleOCRHandle and returns the classes in ClassClassClassClassclassVal. Because multiple classes may be returned by do_ocr_single_class_svmdo_ocr_single_class_svmDoOcrSingleClassSvmDoOcrSingleClassSvmDoOcrSingleClassSvm, CharacterCharacterCharacterCharactercharacter 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_svmDoOcrMultiClassSvmDoOcrMultiClassSvmDoOcrMultiClassSvm must be used. Before calling do_ocr_single_class_svmdo_ocr_single_class_svmDoOcrSingleClassSvmDoOcrSingleClassSvmDoOcrSingleClassSvm, the classifier must be trained with trainf_ocr_class_svmtrainf_ocr_class_svmTrainfOcrClassSvmTrainfOcrClassSvmTrainfOcrClassSvm.

Execution Information

Parameters

CharacterCharacterCharacterCharactercharacter (input_object)  region objectHRegionHRegionHobject

Character to be recognized.

ImageImageImageImageimage (input_object)  singlechannelimage objectHImageHImageHobject (byte / uint2)

Gray values of the character.

OCRHandleOCRHandleOCRHandleOCRHandleOCRHandle (input_control)  ocr_svm HOCRSvm, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Handle of the OCR classifier.

NumNumNumNumnum (input_control)  integer-array HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of best classes to determine.

Default value: 1

Suggested values: 1, 2, 3, 4, 5

ClassClassClassClassclassVal (output_control)  string(-array) HTupleHTupleHtuple (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_svmDoOcrSingleClassSvmDoOcrSingleClassSvmDoOcrSingleClassSvm returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.

Possible Predecessors

trainf_ocr_class_svmtrainf_ocr_class_svmTrainfOcrClassSvmTrainfOcrClassSvmTrainfOcrClassSvm, read_ocr_class_svmread_ocr_class_svmReadOcrClassSvmReadOcrClassSvmReadOcrClassSvm

Alternatives

do_ocr_multi_class_svmdo_ocr_multi_class_svmDoOcrMultiClassSvmDoOcrMultiClassSvmDoOcrMultiClassSvm

See also

create_ocr_class_svmcreate_ocr_class_svmCreateOcrClassSvmCreateOcrClassSvmCreateOcrClassSvm, classify_class_svmclassify_class_svmClassifyClassSvmClassifyClassSvmClassifyClassSvm

Module

OCR/OCV


ClassesClasses | | Operators