Struct opencv::text::OCRHMMDecoder [−][src]
pub struct OCRHMMDecoder { /* fields omitted */ }
Expand description
OCRHMMDecoder class provides an interface for OCR using Hidden Markov Models.
Note:
- (C++) An example on using OCRHMMDecoder recognition combined with scene text detection can be found at the webcam_demo sample: https://github.com/opencv/opencv_contrib/blob/master/modules/text/samples/webcam_demo.cpp
Implementations
pub fn create(
classifier: Ptr<OCRHMMDecoder_ClassifierCallback>,
vocabulary: &str,
transition_probabilities_table: &dyn ToInputArray,
emission_probabilities_table: &dyn ToInputArray,
mode: i32
) -> Result<Ptr<OCRHMMDecoder>>
pub fn create(
classifier: Ptr<OCRHMMDecoder_ClassifierCallback>,
vocabulary: &str,
transition_probabilities_table: &dyn ToInputArray,
emission_probabilities_table: &dyn ToInputArray,
mode: i32
) -> Result<Ptr<OCRHMMDecoder>>
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>>
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>>
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
C++ default parameters Read more