Trait opencv::prelude::TextRecognitionModelTrait
source · [−]pub trait TextRecognitionModelTrait: ModelTrait + TextRecognitionModelTraitConst {
fn as_raw_mut_TextRecognitionModel(&mut self) -> *mut c_void;
fn set_decode_type(
&mut self,
decode_type: &str
) -> Result<TextRecognitionModel> { ... }
fn set_decode_opts_ctc_prefix_beam_search(
&mut self,
beam_size: i32,
voc_prune_size: i32
) -> Result<TextRecognitionModel> { ... }
fn set_vocabulary(
&mut self,
vocabulary: &Vector<String>
) -> Result<TextRecognitionModel> { ... }
}
Required Methods
fn as_raw_mut_TextRecognitionModel(&mut self) -> *mut c_void
Provided Methods
sourcefn set_decode_type(&mut self, decode_type: &str) -> Result<TextRecognitionModel>
fn set_decode_type(&mut self, decode_type: &str) -> Result<TextRecognitionModel>
Set the decoding method of translating the network output into string
Parameters
- decodeType: The decoding method of translating the network output into string, currently supported type:
"CTC-greedy"
greedy decoding for the output of CTC-based methods"CTC-prefix-beam-search"
Prefix beam search decoding for the output of CTC-based methods
sourcefn set_decode_opts_ctc_prefix_beam_search(
&mut self,
beam_size: i32,
voc_prune_size: i32
) -> Result<TextRecognitionModel>
fn set_decode_opts_ctc_prefix_beam_search(
&mut self,
beam_size: i32,
voc_prune_size: i32
) -> Result<TextRecognitionModel>
Set the decoding method options for "CTC-prefix-beam-search"
decode usage
Parameters
- beamSize: Beam size for search
- vocPruneSize: Parameter to optimize big vocabulary search, only take top @p vocPruneSize tokens in each search step, @p vocPruneSize <= 0 stands for disable this prune.
C++ default parameters
- voc_prune_size: 0
sourcefn set_vocabulary(
&mut self,
vocabulary: &Vector<String>
) -> Result<TextRecognitionModel>
fn set_vocabulary(
&mut self,
vocabulary: &Vector<String>
) -> Result<TextRecognitionModel>
Set the vocabulary for recognition.
Parameters
- vocabulary: the associated vocabulary of the network.