opencv::dnn

Trait TextRecognitionModelTraitConst

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

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

Constant methods for crate::dnn::TextRecognitionModel

Required Methods§

Provided Methods§

source

fn get_decode_type(&self) -> Result<String>

Get the decoding method

§Returns

the decoding method

source

fn get_vocabulary(&self) -> Result<Vector<String>>

Get the vocabulary for recognition.

§Returns

vocabulary the associated vocabulary

source

fn recognize(&self, frame: &impl ToInputArray) -> Result<String>

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

§Parameters
  • frame: The input image
§Returns

The text recognition result

source

fn recognize_1( &self, frame: &impl ToInputArray, roi_rects: &impl 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.

Object Safety§

This trait is not object safe.

Implementors§