Show / Hide Table of Contents

Class TextDetectorCNN

TextDetectorCNN class provides the functionality of text bounding box detection.

Inheritance
System.Object
DisposableObject
DisposableCvObject
TextDetector
TextDetectorCNN
Implements
ICvPtrHolder
Inherited Members
DisposableCvObject.ptr
DisposableCvObject.CvPtr
DisposableObject.DataHandle
DisposableObject.IsDisposed
DisposableObject.IsEnabledDispose
DisposableObject.AllocatedMemory
DisposableObject.AllocatedMemorySize
DisposableObject.Dispose()
DisposableObject.Dispose(Boolean)
DisposableObject.AllocGCHandle(Object)
DisposableObject.AllocMemory(Int32)
DisposableObject.NotifyMemoryPressure(Int64)
DisposableObject.ThrowIfDisposed()
Namespace: OpenCvSharp
Assembly: OpenCvSharp.dll
Syntax
public class TextDetectorCNN : TextDetector, ICvPtrHolder
Remarks

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 @cite LiaoSBWL17. The original repository with the modified SSD Caffe version: https://github.com/MhLiao/TextBoxes. Model can be downloaded fromDropBox. Modified.prototxt file with the model description can be found in opencv_contrib/modules/text/samples/textbox.prototxt.

Methods

| Improve this Doc View Source

Create(String, String)

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

Declaration
public static TextDetectorCNN Create(string modelArchFilename, string modelWeightsFilename)
Parameters
Type Name Description
System.String modelArchFilename

the relative or absolute path to the prototxt file describing the classifiers architecture.

System.String modelWeightsFilename

the relative or absolute path to the file containing the pretrained weights of the model in caffe-binary form.

Returns
Type Description
TextDetectorCNN
| Improve this Doc View Source

Create(String, String, IEnumerable<Size>)

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

Declaration
public static TextDetectorCNN Create(string modelArchFilename, string modelWeightsFilename, IEnumerable<Size> detectionSizes)
Parameters
Type Name Description
System.String modelArchFilename

the relative or absolute path to the prototxt file describing the classifiers architecture.

System.String modelWeightsFilename

the relative or absolute path to the file containing the pretrained weights of the model in caffe-binary form.

IEnumerable<OpenCvSharp.Size> detectionSizes

a list of sizes for multiscale detection. The values[(300,300),(700,500),(700,300),(700,700),(1600,1600)] are recommended in @cite LiaoSBWL17 to achieve the best quality.

Returns
Type Description
TextDetectorCNN
| Improve this Doc View Source

Detect(InputArray, out Rect[], out Single[])

Method that provides a quick and simple interface to detect text inside an image

Declaration
public override void Detect(InputArray inputImage, out Rect[] bbox, out float[] confidence)
Parameters
Type Name Description
InputArray inputImage

an image to process

OpenCvSharp.Rect[] bbox

a vector of Rect that will store the detected word bounding box

System.Single[] confidence

a vector of float that will be updated with the confidence the classifier has for the selected bounding box

Overrides
TextDetector.Detect(InputArray, out Rect[], out Single[])
| Improve this Doc View Source

DisposeManaged()

Releases managed resources

Declaration
protected override void DisposeManaged()
Overrides
DisposableObject.DisposeManaged()
| Improve this Doc View Source

DisposeUnmanaged()

Declaration
protected override void DisposeUnmanaged()
Overrides
DisposableCvObject.DisposeUnmanaged()
| Improve this Doc View Source

Get()

Declaration
public override IntPtr Get()
Returns
Type Description
IntPtr

Implements

ICvPtrHolder
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX