[][src]Trait opencv::text::prelude::OCRHolisticWordRecognizer

pub trait OCRHolisticWordRecognizer: BaseOCR {
    pub fn as_raw_OCRHolisticWordRecognizer(&self) -> *const c_void;
pub fn as_raw_mut_OCRHolisticWordRecognizer(&mut self) -> *mut c_void; pub fn run(
        &mut self,
        image: &mut Mat,
        output_text: &mut String,
        component_rects: &mut Vector<Rect>,
        component_texts: &mut Vector<String>,
        component_confidences: &mut Vector<f32>,
        component_level: i32
    ) -> Result<()> { ... }
pub fn run_mask(
        &mut self,
        image: &mut Mat,
        mask: &mut Mat,
        output_text: &mut String,
        component_rects: &mut Vector<Rect>,
        component_texts: &mut Vector<String>,
        component_confidences: &mut Vector<f32>,
        component_level: i32
    ) -> Result<()> { ... } }

OCRHolisticWordRecognizer class provides the functionallity of segmented wordspotting. Given a predefined vocabulary , a DictNet is employed to select the most probable word given an input image.

DictNet is described in detail in: Max Jaderberg et al.: Reading Text in the Wild with Convolutional Neural Networks, IJCV 2015 http://arxiv.org/abs/1412.1842

Required methods

Loading content...

Provided methods

pub fn run(
    &mut self,
    image: &mut Mat,
    output_text: &mut String,
    component_rects: &mut Vector<Rect>,
    component_texts: &mut Vector<String>,
    component_confidences: &mut Vector<f32>,
    component_level: i32
) -> Result<()>
[src]

C++ default parameters

  • component_rects: NULL
  • component_texts: NULL
  • component_confidences: NULL
  • component_level: OCR_LEVEL_WORD

pub fn run_mask(
    &mut self,
    image: &mut Mat,
    mask: &mut Mat,
    output_text: &mut String,
    component_rects: &mut Vector<Rect>,
    component_texts: &mut Vector<String>,
    component_confidences: &mut Vector<f32>,
    component_level: i32
) -> Result<()>
[src]

Recognize text using a segmentation based word-spotting/classifier cnn.

Takes image on input and returns recognized text in the output_text parameter. Optionally provides also the Rects for individual text elements found (e.g. words), and the list of those text elements with their confidence values.

Parameters

  • image: Input image CV_8UC1 or CV_8UC3

  • mask: is totally ignored and is only available for compatibillity reasons

  • output_text: Output text of the the word spoting, always one that exists in the dictionary.

  • component_rects: Not applicable for word spotting can be be NULL if not, a single elemnt will be put in the vector.

  • component_texts: Not applicable for word spotting can be be NULL if not, a single elemnt will be put in the vector.

  • component_confidences: Not applicable for word spotting can be be NULL if not, a single elemnt will be put in the vector.

  • component_level: must be OCR_LEVEL_WORD.

C++ default parameters

  • component_rects: NULL
  • component_texts: NULL
  • component_confidences: NULL
  • component_level: OCR_LEVEL_WORD
Loading content...

Implementations

impl<'_> dyn OCRHolisticWordRecognizer + '_[src]

pub fn create(
    arch_filename: &str,
    weights_filename: &str,
    words_filename: &str
) -> Result<Ptr<dyn OCRHolisticWordRecognizer>>
[src]

Creates an instance of the OCRHolisticWordRecognizer class.

Implementors

Loading content...