do_ocr_multi_class_knn — Classify multiple characters with an k-NN classifier.
do_ocr_multi_class_knn computes the best class for each of the characters given by the regions Character and the gray values Image with the k-NN classifier OCRHandle and returns the classes in Class and the corresponding confidence of the classes in Confidence. The confidences lie between 0.0 and 1.0. The larger the value, the more reliable is the classification of the single characters. In contrast to do_ocr_single_class_knn, do_ocr_multi_class_knn can classify multiple characters in one call, and therefore typically is faster than a loop that uses do_ocr_single_class_knn to classify single characters. However, do_ocr_multi_class_knn can only return the best class of each character.
Before calling do_ocr_multi_class_knn, the classifier must be trained with trainf_ocr_class_knn.
Characters to be recognized.
Gray values of the characters.
Handle of the k-NN classifier.
Result of classifying the characters with the k-NN.
Number of elements: Class == Character
Confidence of the class of the characters.
Number of elements: Confidence == Character
If the parameters are valid, the operator do_ocr_multi_class_knn returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.