[][src]Struct opencv::text::OCRBeamSearchDecoder

pub struct OCRBeamSearchDecoder { /* fields omitted */ }

OCRBeamSearchDecoder class provides an interface for OCR using Beam Search algorithm.

Note:

Implementations

impl OCRBeamSearchDecoder[src]

impl OCRBeamSearchDecoder[src]

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

Creates an instance of the OCRBeamSearchDecoder 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).

  • beam_size: Size of the beam in Beam Search algorithm.

C++ default parameters

  • mode: OCR_DECODER_VITERBI
  • beam_size: 500

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

Creates an instance of the OCRBeamSearchDecoder class. Initializes HMMDecoder from the specified path.

Creates an instance of the OCRBeamSearchDecoder 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).

  • beam_size: Size of the beam in Beam Search algorithm.

Overloaded parameters

C++ default parameters

  • mode: OCR_DECODER_VITERBI
  • beam_size: 500

Trait Implementations

impl BaseOCR for OCRBeamSearchDecoder[src]

impl Boxed for OCRBeamSearchDecoder[src]

impl Drop for OCRBeamSearchDecoder[src]

impl OCRBeamSearchDecoderTrait for OCRBeamSearchDecoder[src]

impl Send for OCRBeamSearchDecoder[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.