[][src]Struct opencv::text::OCRHMMDecoder

pub struct OCRHMMDecoder { /* fields omitted */ }

OCRHMMDecoder class provides an interface for OCR using Hidden Markov Models.

Note:

Implementations

impl OCRHMMDecoder[src]

impl OCRHMMDecoder[src]

pub fn create(
    classifier: Ptr<OCRHMMDecoder_ClassifierCallback>,
    vocabulary: &str,
    transition_probabilities_table: &dyn ToInputArray,
    emission_probabilities_table: &dyn ToInputArray,
    mode: i32
) -> Result<Ptr<OCRHMMDecoder>>
[src]

Creates an instance of the OCRHMMDecoder class. Initializes HMMDecoder.

Parameters

  • classifier: The character classifier with built in feature extractor.

  • vocabulary: The language vocabulary (chars when ascii english text). vocabulary.size() must be equal to the number of classes of the classifier.

  • transition_probabilities_table: Table with transition probabilities between character pairs. cols == rows == vocabulary.size().

  • emission_probabilities_table: Table with observation emission probabilities. cols == rows == vocabulary.size().

  • mode: HMM Decoding algorithm. Only OCR_DECODER_VITERBI is available for the moment (http://en.wikipedia.org/wiki/Viterbi_algorithm).

C++ default parameters

  • mode: OCR_DECODER_VITERBI

pub fn create_1(
    filename: &str,
    vocabulary: &str,
    transition_probabilities_table: &dyn ToInputArray,
    emission_probabilities_table: &dyn ToInputArray,
    mode: i32,
    classifier: i32
) -> Result<Ptr<OCRHMMDecoder>>
[src]

Creates an instance of the OCRHMMDecoder class. Loads and initializes HMMDecoder from the specified path

 Creates an instance of the OCRHMMDecoder class. Initializes HMMDecoder.

Parameters

  • classifier: The character classifier with built in feature extractor.

  • vocabulary: The language vocabulary (chars when ascii english text). vocabulary.size() must be equal to the number of classes of the classifier.

  • transition_probabilities_table: Table with transition probabilities between character pairs. cols == rows == vocabulary.size().

  • emission_probabilities_table: Table with observation emission probabilities. cols == rows == vocabulary.size().

  • mode: HMM Decoding algorithm. Only OCR_DECODER_VITERBI is available for the moment (http://en.wikipedia.org/wiki/Viterbi_algorithm).

Overloaded parameters

C++ default parameters

  • mode: OCR_DECODER_VITERBI
  • classifier: OCR_KNN_CLASSIFIER

Trait Implementations

impl BaseOCR for OCRHMMDecoder[src]

impl Boxed for OCRHMMDecoder[src]

impl Drop for OCRHMMDecoder[src]

impl OCRHMMDecoderTrait for OCRHMMDecoder[src]

impl Send for OCRHMMDecoder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.