Skip to content

ocr_get_featuresOcrGetFeaturesOcrGetFeaturesocr_get_featuresT_ocr_get_features🔗

Short description🔗

ocr_get_featuresOcrGetFeaturesOcrGetFeaturesocr_get_featuresT_ocr_get_features — Access the features which correspond to a character.

Warning🔗

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

Signature🔗

ocr_get_features( image Character, ocr_box OcrHandle, out real FeatureVector )void OcrGetFeatures( const HObject& Character, const HTuple& OcrHandle, HTuple* FeatureVector )static void HOperatorSet.OcrGetFeatures( HObject character, HTuple ocrHandle, out HTuple featureVector )def ocr_get_features( character: HObject, ocr_handle: HHandle ) -> Sequence[float]

Herror T_ocr_get_features( const Hobject Character, const Htuple OcrHandle, Htuple* FeatureVector )

HTuple HImage::OcrGetFeatures( const HOCRBox& OcrHandle ) const

HTuple HOCRBox::OcrGetFeatures( const HImage& Character ) const

HTuple HImage.OcrGetFeatures( HOCRBox ocrHandle )

HTuple HOCRBox.OcrGetFeatures( HImage character )

Description🔗

The operator ocr_get_featuresOcrGetFeatures calculates the features for the given Charactercharactercharacter. The type and number of features is determined by the classifier OcrHandleocrHandleocr_handle. FeatureVectorfeatureVectorfeature_vector contains the same values which are used inside operators like traind_ocr_class_boxTraindOcrClassBox or trainf_ocr_class_boxTrainfOcrClassBox.

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) singlechannelimage → object (byte / uint2)HObject (byte / uint2)HImage (byte / uint2)HObject (byte / uint2)Hobject (byte / uint2)

Characters to be trained.

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

ID of the desired OCR-classifier.

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

Feature vector.

Result🔗

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

Combinations with other operators🔗

Combinations

Possible predecessors

read_ocrReadOcr, reduce_domainReduceDomain, thresholdThreshold, connectionConnection

See also

trainf_ocr_class_boxTrainfOcrClassBox, traind_ocr_class_boxTraindOcrClassBox

Module🔗

OCR/OCV