do_ocr_multi_class_cnn T_do_ocr_multi_class_cnn DoOcrMultiClassCnn DoOcrMultiClassCnn do_ocr_multi_class_cnn (Operator)
Name
do_ocr_multi_class_cnn T_do_ocr_multi_class_cnn DoOcrMultiClassCnn DoOcrMultiClassCnn do_ocr_multi_class_cnn
— Classify multiple characters with an CNN-based OCR classifier.
Signature
void DoOcrMultiClassCnn (const HObject& Character , const HObject& Image , const HTuple& OCRHandle , HTuple* Class , HTuple* Confidence )
HTuple HRegion ::DoOcrMultiClassCnn (const HImage& Image , const HOCRCnn& OCRHandle , HTuple* Confidence ) const
HString HRegion ::DoOcrMultiClassCnn (const HImage& Image , const HOCRCnn& OCRHandle , double* Confidence ) const
HTuple HOCRCnn ::DoOcrMultiClassCnn (const HRegion& Character , const HImage& Image , HTuple* Confidence ) const
HString HOCRCnn ::DoOcrMultiClassCnn (const HRegion& Character , const HImage& Image , double* Confidence ) const
static void HOperatorSet .DoOcrMultiClassCnn (HObject character , HObject image , HTuple OCRHandle , out HTuple classVal , out HTuple confidence )
HTuple HRegion .DoOcrMultiClassCnn (HImage image , HOCRCnn OCRHandle , out HTuple confidence )
string HRegion .DoOcrMultiClassCnn (HImage image , HOCRCnn OCRHandle , out double confidence )
HTuple HOCRCnn .DoOcrMultiClassCnn (HRegion character , HImage image , out HTuple confidence )
string HOCRCnn .DoOcrMultiClassCnn (HRegion character , HImage image , out double confidence )
Description
do_ocr_multi_class_cnn do_ocr_multi_class_cnn DoOcrMultiClassCnn DoOcrMultiClassCnn do_ocr_multi_class_cnn
computes the best class for each of
the characters given by the regions Character Character Character character character
and the gray
values Image Image Image image image
with the OCR classifier OCRHandle OCRHandle OCRHandle OCRHandle ocrhandle
and
returns the classes in Class Class Class classVal class
and the corresponding
confidences (probabilities) of the classes in Confidence Confidence Confidence confidence confidence
.
In contrast to do_ocr_single_class_cnn do_ocr_single_class_cnn DoOcrSingleClassCnn DoOcrSingleClassCnn do_ocr_single_class_cnn
,
do_ocr_multi_class_cnn do_ocr_multi_class_cnn DoOcrMultiClassCnn DoOcrMultiClassCnn do_ocr_multi_class_cnn
can classify multiple characters in
one call, and therefore typically is faster than a loop that uses
do_ocr_single_class_cnn do_ocr_single_class_cnn DoOcrSingleClassCnn DoOcrSingleClassCnn do_ocr_single_class_cnn
to classify single characters.
However, do_ocr_multi_class_cnn do_ocr_multi_class_cnn DoOcrMultiClassCnn DoOcrMultiClassCnn do_ocr_multi_class_cnn
can only return the best
class of each character. Because the confidences can be interpreted as
probabilities, it is easier to check whether a character has been
classified with too much uncertainty. This is usually not a disadvantage,
except in cases where the classes overlap so much that in many cases the
second best class must be examined to be able to decide the class of the
character. In these cases, do_ocr_single_class_cnn do_ocr_single_class_cnn DoOcrSingleClassCnn DoOcrSingleClassCnn do_ocr_single_class_cnn
should be used.
A string of the number
(alternatively
displayed as
) in
Class Class Class classVal class
signifies that the region has been classified as rejection
class.
Execution Information
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
Automatically parallelized on internal data level.
Parameters
Character Character Character character character
(input_object) region(-array) →
object HRegion HObject HObject Hobject
Characters to be recognized.
Image Image Image image image
(input_object) singlechannelimage →
object HImage HObject HObject Hobject (byte / uint2)
Gray values of the characters.
OCRHandle OCRHandle OCRHandle OCRHandle ocrhandle
(input_control) ocr_cnn →
HOCRCnn , HTuple HHandle HTuple Htuple (handle) (IntPtr ) (HHandle ) (handle )
Handle of the OCR classifier.
Class Class Class classVal class
(output_control) string(-array) →
HTuple Sequence[str] HTuple Htuple (string) (string ) (HString ) (char* )
Result of classifying the characters with the
CNN.
Number of elements:
Class == Character
Confidence Confidence Confidence confidence confidence
(output_control) real(-array) →
HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Confidence of the class of the characters.
Number of elements:
Confidence == Character
Result
If the parameters are valid, the operator
do_ocr_multi_class_cnn do_ocr_multi_class_cnn DoOcrMultiClassCnn DoOcrMultiClassCnn do_ocr_multi_class_cnn
returns the value 2 (
H_MSG_TRUE )
. If
necessary, an exception is raised.
Possible Predecessors
read_ocr_class_cnn read_ocr_class_cnn ReadOcrClassCnn ReadOcrClassCnn read_ocr_class_cnn
Alternatives
do_ocr_word_cnn do_ocr_word_cnn DoOcrWordCnn DoOcrWordCnn do_ocr_word_cnn
,
do_ocr_single_class_cnn do_ocr_single_class_cnn DoOcrSingleClassCnn DoOcrSingleClassCnn do_ocr_single_class_cnn
Module
OCR/OCV