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

pub trait TextDetectorCNN: TextDetector {
    pub fn as_raw_TextDetectorCNN(&self) -> *const c_void;
pub fn as_raw_mut_TextDetectorCNN(&mut self) -> *mut c_void; pub fn detect(
        &mut self,
        input_image: &dyn ToInputArray,
        bbox: &mut Vector<Rect>,
        confidence: &mut Vector<f32>
    ) -> Result<()> { ... } }

TextDetectorCNN class provides the functionallity of text bounding box detection. This class is representing to find bounding boxes of text words given an input image. This class uses OpenCV dnn module to load pre-trained model described in LiaoSBWL17. The original repository with the modified SSD Caffe version: https://github.com/MhLiao/TextBoxes. Model can be downloaded from DropBox. Modified .prototxt file with the model description can be found in opencv_contrib/modules/text/samples/textbox.prototxt.

Required methods

Loading content...

Provided methods

pub fn detect(
    &mut self,
    input_image: &dyn ToInputArray,
    bbox: &mut Vector<Rect>,
    confidence: &mut Vector<f32>
) -> Result<()>
[src]

Parameters

  • inputImage: an image expected to be a CV_U8C3 of any size
  • Bbox: a vector of Rect that will store the detected word bounding box
  • confidence: a vector of float that will be updated with the confidence the classifier has for the selected bounding box
Loading content...

Implementations

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

pub fn create(
    model_arch_filename: &str,
    model_weights_filename: &str,
    detection_sizes: Vector<Size>
) -> Result<Ptr<dyn TextDetectorCNN>>
[src]

Creates an instance of the TextDetectorCNN class using the provided parameters.

Parameters

  • modelArchFilename: the relative or absolute path to the prototxt file describing the classifiers architecture.
  • modelWeightsFilename: the relative or absolute path to the file containing the pretrained weights of the model in caffe-binary form.
  • detectionSizes: a list of sizes for multiscale detection. The values[(300,300),(700,500),(700,300),(700,700),(1600,1600)] are recommended in LiaoSBWL17 to achieve the best quality.

pub fn create_1(
    model_arch_filename: &str,
    model_weights_filename: &str
) -> Result<Ptr<dyn TextDetectorCNN>>
[src]

Creates an instance of the TextDetectorCNN class using the provided parameters.

Parameters

  • modelArchFilename: the relative or absolute path to the prototxt file describing the classifiers architecture.
  • modelWeightsFilename: the relative or absolute path to the file containing the pretrained weights of the model in caffe-binary form.
  • detectionSizes: a list of sizes for multiscale detection. The values[(300,300),(700,500),(700,300),(700,700),(1600,1600)] are recommended in LiaoSBWL17 to achieve the best quality.

Overloaded parameters

Implementors

Loading content...