Class TextDetectorCNN
TextDetectorCNN class provides the functionality of text bounding box detection.
Implements
Inherited Members
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 SourceCreate(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 |
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 |
Returns
Type | Description |
---|---|
TextDetectorCNN |
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
| Improve this Doc View SourceDisposeManaged()
Releases managed resources
Declaration
protected override void DisposeManaged()