[−][src]Struct opencv::text::OCRBeamSearchDecoder
OCRBeamSearchDecoder class provides an interface for OCR using Beam Search algorithm.
Note:
- (C++) An example on using OCRBeamSearchDecoder recognition combined with scene text detection can be found at the demo sample: https://github.com/opencv/opencv_contrib/blob/master/modules/text/samples/word_recognition.cpp
Implementations
impl OCRBeamSearchDecoder
[src]
pub fn as_raw_OCRBeamSearchDecoder(&self) -> *const c_void
[src]
pub fn as_raw_mut_OCRBeamSearchDecoder(&mut self) -> *mut c_void
[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]
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>>
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]
filename: &str,
vocabulary: &str,
transition_probabilities_table: &dyn ToInputArray,
emission_probabilities_table: &dyn ToInputArray,
mode: decoder_mode,
beam_size: i32
) -> Result<Ptr<OCRBeamSearchDecoder>>
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]
pub fn as_raw_BaseOCR(&self) -> *const c_void
[src]
pub fn as_raw_mut_BaseOCR(&mut self) -> *mut c_void
[src]
pub fn run(
&mut self,
image: &mut Mat,
output_text: &mut String,
component_rects: &mut Vector<Rect>,
component_texts: &mut Vector<String>,
component_confidences: &mut Vector<f32>,
component_level: i32
) -> Result<()>
[src]
&mut self,
image: &mut Mat,
output_text: &mut String,
component_rects: &mut Vector<Rect>,
component_texts: &mut Vector<String>,
component_confidences: &mut Vector<f32>,
component_level: i32
) -> Result<()>
pub fn run_mask(
&mut self,
image: &mut Mat,
mask: &mut Mat,
output_text: &mut String,
component_rects: &mut Vector<Rect>,
component_texts: &mut Vector<String>,
component_confidences: &mut Vector<f32>,
component_level: i32
) -> Result<()>
[src]
&mut self,
image: &mut Mat,
mask: &mut Mat,
output_text: &mut String,
component_rects: &mut Vector<Rect>,
component_texts: &mut Vector<String>,
component_confidences: &mut Vector<f32>,
component_level: i32
) -> Result<()>
impl Boxed for OCRBeamSearchDecoder
[src]
pub unsafe fn from_raw(ptr: *mut c_void) -> Self
[src]
pub fn into_raw(self) -> *mut c_void
[src]
pub fn as_raw(&self) -> *const c_void
[src]
pub fn as_raw_mut(&mut self) -> *mut c_void
[src]
impl Drop for OCRBeamSearchDecoder
[src]
impl OCRBeamSearchDecoderTrait for OCRBeamSearchDecoder
[src]
pub fn as_raw_OCRBeamSearchDecoder(&self) -> *const c_void
[src]
pub fn as_raw_mut_OCRBeamSearchDecoder(&mut self) -> *mut c_void
[src]
pub fn run_multiple(
&mut self,
image: &mut Mat,
output_text: &mut String,
component_rects: &mut Vector<Rect>,
component_texts: &mut Vector<String>,
component_confidences: &mut Vector<f32>,
component_level: i32
) -> Result<()>
[src]
&mut self,
image: &mut Mat,
output_text: &mut String,
component_rects: &mut Vector<Rect>,
component_texts: &mut Vector<String>,
component_confidences: &mut Vector<f32>,
component_level: i32
) -> Result<()>
pub fn run_multiple_mask(
&mut self,
image: &mut Mat,
mask: &mut Mat,
output_text: &mut String,
component_rects: &mut Vector<Rect>,
component_texts: &mut Vector<String>,
component_confidences: &mut Vector<f32>,
component_level: i32
) -> Result<()>
[src]
&mut self,
image: &mut Mat,
mask: &mut Mat,
output_text: &mut String,
component_rects: &mut Vector<Rect>,
component_texts: &mut Vector<String>,
component_confidences: &mut Vector<f32>,
component_level: i32
) -> Result<()>
pub fn run(
&mut self,
image: &dyn ToInputArray,
min_confidence: i32,
component_level: i32
) -> Result<String>
[src]
&mut self,
image: &dyn ToInputArray,
min_confidence: i32,
component_level: i32
) -> Result<String>
pub fn run_mask(
&mut self,
image: &dyn ToInputArray,
mask: &dyn ToInputArray,
min_confidence: i32,
component_level: i32
) -> Result<String>
[src]
&mut self,
image: &dyn ToInputArray,
mask: &dyn ToInputArray,
min_confidence: i32,
component_level: i32
) -> Result<String>
impl Send for OCRBeamSearchDecoder
[src]
Auto Trait Implementations
impl RefUnwindSafe for OCRBeamSearchDecoder
[src]
impl !Sync for OCRBeamSearchDecoder
[src]
impl Unpin for OCRBeamSearchDecoder
[src]
impl UnwindSafe for OCRBeamSearchDecoder
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,