Skip to content

testd_ocr_class_boxTestdOcrClassBoxTestdOcrClassBoxtestd_ocr_class_boxT_testd_ocr_class_box🔗

Short description🔗

testd_ocr_class_boxTestdOcrClassBoxTestdOcrClassBoxtestd_ocr_class_boxT_testd_ocr_class_box — Test an OCR classifier.

Warning🔗

testd_ocr_class_boxTestdOcrClassBox is obsolete and is only provided for reasons of backward compatibility. New applications should use the MLP, SVM or CNN based operators instead.

Signature🔗

testd_ocr_class_box( region Character, image Image, ocr_box OcrHandle, string Class, out real Confidence )void TestdOcrClassBox( const HObject& Character, const HObject& Image, const HTuple& OcrHandle, const HTuple& Class, HTuple* Confidence )static void HOperatorSet.TestdOcrClassBox( HObject character, HObject image, HTuple ocrHandle, HTuple classVal, out HTuple confidence )def testd_ocr_class_box( character: HObject, image: HObject, ocr_handle: HHandle, class_val: MaybeSequence[str] ) -> Sequence[float]

def testd_ocr_class_box_s( character: HObject, image: HObject, ocr_handle: HHandle, class_val: MaybeSequence[str] ) -> floatHerror T_testd_ocr_class_box( const Hobject Character, const Hobject Image, const Htuple OcrHandle, const Htuple Class, Htuple* Confidence )

HTuple HRegion::TestdOcrClassBox( const HImage& Image, const HOCRBox& OcrHandle, const HTuple& Class ) const

double HRegion::TestdOcrClassBox( const HImage& Image, const HOCRBox& OcrHandle, const HString& Class ) const

double HRegion::TestdOcrClassBox( const HImage& Image, const HOCRBox& OcrHandle, const char* Class ) const

double HRegion::TestdOcrClassBox( const HImage& Image, const HOCRBox& OcrHandle, const wchar_t* Class ) const (Windows only)

HTuple HOCRBox::TestdOcrClassBox( const HRegion& Character, const HImage& Image, const HTuple& Class ) const

double HOCRBox::TestdOcrClassBox( const HRegion& Character, const HImage& Image, const HString& Class ) const

double HOCRBox::TestdOcrClassBox( const HRegion& Character, const HImage& Image, const char* Class ) const

double HOCRBox::TestdOcrClassBox( const HRegion& Character, const HImage& Image, const wchar_t* Class ) const (Windows only)

HTuple HRegion.TestdOcrClassBox( HImage image, HOCRBox ocrHandle, HTuple classVal )

double HRegion.TestdOcrClassBox( HImage image, HOCRBox ocrHandle, string classVal )

HTuple HOCRBox.TestdOcrClassBox( HRegion character, HImage image, HTuple classVal )

double HOCRBox.TestdOcrClassBox( HRegion character, HImage image, string classVal )

Description🔗

The operator testd_ocr_class_boxTestdOcrClassBox tests the confidence with which a character belongs to a given class. Any number of regions of an image can be passed. For each character (region) in Charactercharactercharacter the corresponding name (class) ClassclassValclass must be specified. The gray values are passed in Imageimageimage. When the operator has finished the parameter Confidenceconfidenceconfidence provides information about how sure a character belongs to the (arbitrary chosen) class.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

Charactercharactercharacter (input_object) region(-array) → objectHObjectHRegionHObjectHobject

Characters to be tested.

Imageimageimage (input_object) singlechannelimage → object (byte / uint2)HObject (byte / uint2)HImage (byte / uint2)HObject (byte / uint2)Hobject (byte / uint2)

Gray values for the characters.

OcrHandleocrHandleocr_handle (input_control) ocr_box → (handle)HTuple (HHandle)HOCRBox, HTuple (IntPtr)HHandleHtuple (handle)

ID of the desired OCR-classifier.

ClassclassValclass (input_control) string(-array) → (string)HTuple (HString)HTuple (string)MaybeSequence[str]Htuple (char*)

Class (name) of the characters.

Default: 'a'"a"

Confidenceconfidenceconfidence (output_control) real(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Confidence for the character to belong to the class.

Result🔗

If the parameters are correct, the operator testd_ocr_class_boxTestdOcrClassBox returns the value 2 (H_MSG_TRUE). Otherwise an exception will be raised.

Combinations with other operators🔗

Combinations

Possible predecessors

read_ocrReadOcr, trainf_ocr_class_boxTrainfOcrClassBox, traind_ocr_class_boxTraindOcrClassBox

Module🔗

OCR/OCV