[−][src]Trait opencv::dnn::prelude::TextRecognitionModelTrait
This class represents high-level API for text recognition networks.
TextRecognitionModel allows to set params for preprocessing input image. TextRecognitionModel creates net from file with trained weights and config, sets preprocessing input, runs forward pass and return recognition result. For TextRecognitionModel, CRNN-CTC is supported.
Required methods
pub fn as_raw_TextRecognitionModel(&self) -> *const c_void
[src]
pub fn as_raw_mut_TextRecognitionModel(&mut self) -> *mut c_void
[src]
Provided methods
pub fn set_decode_type(
&mut self,
decode_type: &str
) -> Result<TextRecognitionModel>
[src]
&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: {'CTC-greedy': greedy decoding for the output of CTC-based methods}
pub fn get_decode_type(&self) -> Result<String>
[src]
pub fn set_vocabulary(
&mut self,
vocabulary: &Vector<String>
) -> Result<TextRecognitionModel>
[src]
&mut self,
vocabulary: &Vector<String>
) -> Result<TextRecognitionModel>
Set the vocabulary for recognition.
Parameters
- vocabulary: the associated vocabulary of the network.
pub fn get_vocabulary(&self) -> Result<Vector<String>>
[src]
pub fn recognize(&self, frame: &dyn ToInputArray) -> Result<String>
[src]
Given the @p input frame, create input blob, run net and return recognition result
Parameters
- frame: The input image
Returns
The text recognition result
pub fn recognize_1(
&self,
frame: &dyn ToInputArray,
roi_rects: &dyn ToInputArray,
results: &mut Vector<String>
) -> Result<()>
[src]
&self,
frame: &dyn ToInputArray,
roi_rects: &dyn ToInputArray,
results: &mut Vector<String>
) -> Result<()>
Given the @p input frame, create input blob, run net and return recognition result
Parameters
- frame: The input image
- roiRects: List of text detection regions of interest (cv::Rect, CV_32SC4). ROIs is be cropped as the network inputs
- results:[out] A set of text recognition results.