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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§