[][src]Trait opencv::prelude::OCRHMMDecoder_ClassifierCallbackTrait

pub trait OCRHMMDecoder_ClassifierCallbackTrait {
    pub fn as_raw_OCRHMMDecoder_ClassifierCallback(&self) -> *const c_void;
pub fn as_raw_mut_OCRHMMDecoder_ClassifierCallback(&mut self) -> *mut c_void; pub fn eval(
        &mut self,
        image: &dyn ToInputArray,
        out_class: &mut Vector<i32>,
        out_confidence: &mut Vector<f64>
    ) -> Result<()> { ... } }

Callback with the character classifier is made a class.

This way it hides the feature extractor and the classifier itself, so developers can write their own OCR code.

The default character classifier and feature extractor can be loaded using the utility function loadOCRHMMClassifierNM and KNN model provided in https://github.com/opencv/opencv_contrib/blob/master/modules/text/samples/OCRHMM_knn_model_data.xml.gz.

Required methods

Loading content...

Provided methods

pub fn eval(
    &mut self,
    image: &dyn ToInputArray,
    out_class: &mut Vector<i32>,
    out_confidence: &mut Vector<f64>
) -> Result<()>
[src]

The character classifier must return a (ranked list of) class(es) id('s)

Parameters

  • image: Input image CV_8UC1 or CV_8UC3 with a single letter.
  • out_class: The classifier returns the character class categorical label, or list of class labels, to which the input image corresponds.
  • out_confidence: The classifier returns the probability of the input image corresponding to each classes in out_class.
Loading content...

Implementors

Loading content...