[][src]Trait opencv::hub_prelude::OCRBeamSearchDecoderTrait

pub trait OCRBeamSearchDecoderTrait: BaseOCR {
    fn as_raw_OCRBeamSearchDecoder(&self) -> *mut c_void;

    fn run(
        &mut self,
        image: &mut Mat,
        output_text: &mut String,
        component_rects: &mut VectorOfRect,
        component_texts: &mut VectorOfString,
        component_confidences: &mut VectorOff32,
        component_level: i32
    ) -> Result<()> { ... }
fn run_1(
        &mut self,
        image: &mut Mat,
        mask: &mut Mat,
        output_text: &mut String,
        component_rects: &mut VectorOfRect,
        component_texts: &mut VectorOfString,
        component_confidences: &mut VectorOff32,
        component_level: i32
    ) -> Result<()> { ... }
fn run_2(
        &mut self,
        image: &dyn ToInputArray,
        min_confidence: i32,
        component_level: i32
    ) -> Result<String> { ... }
fn run_3(
        &mut self,
        image: &dyn ToInputArray,
        mask: &dyn ToInputArray,
        min_confidence: i32,
        component_level: i32
    ) -> Result<String> { ... } }

OCRBeamSearchDecoder class provides an interface for OCR using Beam Search algorithm.

Note:

Required methods

Loading content...

Provided methods

fn run(
    &mut self,
    image: &mut Mat,
    output_text: &mut String,
    component_rects: &mut VectorOfRect,
    component_texts: &mut VectorOfString,
    component_confidences: &mut VectorOff32,
    component_level: i32
) -> Result<()>

Recognize text using Beam Search.

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 binary image CV_8UC1 with a single text line (or word).

  • output_text: Output text. Most likely character sequence found by the HMM decoder.

  • component_rects: If provided the method will output a list of Rects for the individual text elements found (e.g. words).

  • component_texts: If provided the method will output a list of text strings for the recognition of individual text elements found (e.g. words).

  • component_confidences: If provided the method will output a list of confidence values for the recognition of individual text elements found (e.g. words).

  • component_level: Only OCR_LEVEL_WORD is supported.

C++ default parameters

  • component_rects: NULL
  • component_texts: NULL
  • component_confidences: NULL
  • component_level: 0

fn run_1(
    &mut self,
    image: &mut Mat,
    mask: &mut Mat,
    output_text: &mut String,
    component_rects: &mut VectorOfRect,
    component_texts: &mut VectorOfString,
    component_confidences: &mut VectorOff32,
    component_level: i32
) -> Result<()>

C++ default parameters

  • component_rects: NULL
  • component_texts: NULL
  • component_confidences: NULL
  • component_level: 0

fn run_2(
    &mut self,
    image: &dyn ToInputArray,
    min_confidence: i32,
    component_level: i32
) -> Result<String>

C++ default parameters

  • component_level: 0

fn run_3(
    &mut self,
    image: &dyn ToInputArray,
    mask: &dyn ToInputArray,
    min_confidence: i32,
    component_level: i32
) -> Result<String>

C++ default parameters

  • component_level: 0
Loading content...

Implementors

impl OCRBeamSearchDecoderTrait for OCRBeamSearchDecoder[src]

impl OCRBeamSearchDecoderTrait for PtrOfOCRBeamSearchDecoder[src]

Loading content...