[][src]Trait opencv::prelude::OCRBeamSearchDecoder_ClassifierCallbackTrait

pub trait OCRBeamSearchDecoder_ClassifierCallbackTrait {
    pub fn as_raw_OCRBeamSearchDecoder_ClassifierCallback(
        &self
    ) -> *const c_void;
pub fn as_raw_mut_OCRBeamSearchDecoder_ClassifierCallback(
        &mut self
    ) -> *mut c_void; pub fn eval(
        &mut self,
        image: &dyn ToInputArray,
        recognition_probabilities: &mut Vector<Vector<f64>>,
        oversegmentation: &mut Vector<i32>
    ) -> Result<()> { ... }
pub fn get_window_size(&mut self) -> Result<i32> { ... }
pub fn get_step_size(&mut self) -> Result<i32> { ... } }

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 loadOCRBeamSearchClassifierCNN with all its parameters provided in https://github.com/opencv/opencv_contrib/blob/master/modules/text/samples/OCRBeamSearch_CNN_model_data.xml.gz.

Required methods

Loading content...

Provided methods

pub fn eval(
    &mut self,
    image: &dyn ToInputArray,
    recognition_probabilities: &mut Vector<Vector<f64>>,
    oversegmentation: &mut Vector<i32>
) -> 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.
  • recognition_probabilities: For each of the N characters found the classifier returns a list with class probabilities for each class.
  • oversegmentation: The classifier returns a list of N+1 character locations' x-coordinates, including 0 as start-sequence location.

pub fn get_window_size(&mut self) -> Result<i32>[src]

pub fn get_step_size(&mut self) -> Result<i32>[src]

Loading content...

Implementors

Loading content...