Name
do_ocr_single_class_knnT_do_ocr_single_class_knnDoOcrSingleClassKnnDoOcrSingleClassKnn — Classify a single character with an OCR classifier.
void DoOcrSingleClassKnn(const HObject& Character, const HObject& Image, const HTuple& OCRHandle, const HTuple& NumClasses, const HTuple& NumNeighbors, HTuple* Class, HTuple* Confidence)
HTuple HRegion::DoOcrSingleClassKnn(const HImage& Image, const HOCRKnn& OCRHandle, const HTuple& NumClasses, const HTuple& NumNeighbors, HTuple* Confidence) const
HString HRegion::DoOcrSingleClassKnn(const HImage& Image, const HOCRKnn& OCRHandle, const HTuple& NumClasses, const HTuple& NumNeighbors, double* Confidence) const
HTuple HOCRKnn::DoOcrSingleClassKnn(const HRegion& Character, const HImage& Image, const HTuple& NumClasses, const HTuple& NumNeighbors, HTuple* Confidence) const
HString HOCRKnn::DoOcrSingleClassKnn(const HRegion& Character, const HImage& Image, const HTuple& NumClasses, const HTuple& NumNeighbors, double* Confidence) const
static void HOperatorSet.DoOcrSingleClassKnn(HObject character, HObject image, HTuple OCRHandle, HTuple numClasses, HTuple numNeighbors, out HTuple classVal, out HTuple confidence)
HTuple HRegion.DoOcrSingleClassKnn(HImage image, HOCRKnn OCRHandle, HTuple numClasses, HTuple numNeighbors, out HTuple confidence)
string HRegion.DoOcrSingleClassKnn(HImage image, HOCRKnn OCRHandle, HTuple numClasses, HTuple numNeighbors, out double confidence)
HTuple HOCRKnn.DoOcrSingleClassKnn(HRegion character, HImage image, HTuple numClasses, HTuple numNeighbors, out HTuple confidence)
string HOCRKnn.DoOcrSingleClassKnn(HRegion character, HImage image, HTuple numClasses, HTuple numNeighbors, out double confidence)
do_ocr_single_class_knndo_ocr_single_class_knnDoOcrSingleClassKnnDoOcrSingleClassKnnDoOcrSingleClassKnn uses the OCR-k-NN classifier
OCRHandleOCRHandleOCRHandleOCRHandleOCRHandle to determine the best training samples for the
features of the character given by the region CharacterCharacterCharacterCharactercharacter and
the gray values ImageImageImageImageimage and returns their classes in
ClassClassClassClassclassVal and the corresponding confidences in ConfidenceConfidenceConfidenceConfidenceconfidence.
If the first NumNeighborsNumNeighborsNumNeighborsNumNeighborsnumNeighbors training vectors have different classes,
maximally NumClassesNumClassesNumClassesNumClassesnumClasses classes are returned sorted by frequency
and weighted distance.
The confidences lie between 0.0 and 1.0. The larger the value, the
more reliable is the classification.
The confidence can be only computed robustly
if NumNeighborsNumNeighborsNumNeighborsNumNeighborsnumNeighbors is large enough.
Because multiple classes may be returned by
do_ocr_single_class_knndo_ocr_single_class_knnDoOcrSingleClassKnnDoOcrSingleClassKnnDoOcrSingleClassKnn, CharacterCharacterCharacterCharactercharacter may only contain
a single region (a single character). If multiple characters should
be classified in a single call, do_ocr_multi_class_knndo_ocr_multi_class_knnDoOcrMultiClassKnnDoOcrMultiClassKnnDoOcrMultiClassKnn must
be used. Before calling do_ocr_single_class_knndo_ocr_single_class_knnDoOcrSingleClassKnnDoOcrSingleClassKnnDoOcrSingleClassKnn, the classifier must
be trained with trainf_ocr_class_knntrainf_ocr_class_knnTrainfOcrClassKnnTrainfOcrClassKnnTrainfOcrClassKnn or
select_feature_set_trainf_knnselect_feature_set_trainf_knnSelectFeatureSetTrainfKnnSelectFeatureSetTrainfKnnSelectFeatureSetTrainfKnn.
If all NumNeighborsNumNeighborsNumNeighborsNumNeighborsnumNeighbors neighbors are of the same class, only
one class is returned.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Character to be recognized.
Gray values of the character.
Handle of the k-NN classifier.
Number of maximal classes to determine.
Default value: 1
Suggested values: 1, 2, 3, 4, 5
Number of neighbors to consider.
Default value: 1
Suggested values: 1, 2, 3, 4, 5
Results of classifying the character with the
k-NN.
Confidence(s) of the class(es) of the character.
If the parameters are valid, the operator
do_ocr_single_class_knndo_ocr_single_class_knnDoOcrSingleClassKnnDoOcrSingleClassKnnDoOcrSingleClassKnn returns the value 2 (H_MSG_TRUE). If
necessary, an exception is raised.
trainf_ocr_class_knntrainf_ocr_class_knnTrainfOcrClassKnnTrainfOcrClassKnnTrainfOcrClassKnn,
read_ocr_class_knnread_ocr_class_knnReadOcrClassKnnReadOcrClassKnnReadOcrClassKnn
do_ocr_multi_class_knndo_ocr_multi_class_knnDoOcrMultiClassKnnDoOcrMultiClassKnnDoOcrMultiClassKnn
create_ocr_class_knncreate_ocr_class_knnCreateOcrClassKnnCreateOcrClassKnnCreateOcrClassKnn,
classify_class_knnclassify_class_knnClassifyClassKnnClassifyClassKnnClassifyClassKnn
OCR/OCV