pub trait TextRecognitionModelTraitConst: ModelTraitConst {
    fn as_raw_TextRecognitionModel(&self) -> *const c_void;

    fn get_decode_type(&self) -> Result<String> { ... }
    fn get_vocabulary(&self) -> Result<Vector<String>> { ... }
    fn recognize(&self, frame: &dyn ToInputArray) -> Result<String> { ... }
    fn recognize_1(
        &self,
        frame: &dyn ToInputArray,
        roi_rects: &dyn ToInputArray,
        results: &mut Vector<String>
    ) -> Result<()> { ... } }
Expand description

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

Provided Methods

Get the decoding method

Returns

the decoding method

Get the vocabulary for recognition.

Returns

vocabulary the associated vocabulary

Given the @p input frame, create input blob, run net and return recognition result

Parameters
  • frame: The input image
Returns

The text recognition 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.

Implementors