Table of Contents

Class TextRecognitionModel

Namespace
OpenCvSharp.Dnn
Assembly
OpenCvSharp.dll

This class represents high-level API for text recognition networks. TextRecognitionModel allows to set params for preprocessing input image. TextRecognitionModel creates net from file with trained weights and config, sets preprocessing input, runs forward pass and return recognition result. For TextRecognitionModel, CRNN-CTC is supported.

public class TextRecognitionModel : Model, IDisposable
Inheritance
TextRecognitionModel
Implements
Inherited Members

Constructors

TextRecognitionModel(Net)

Create model from deep learning network.

TextRecognitionModel(string, string?)

Create text recognition model from network represented in one of the supported formats. An order of @p model and @p config arguments does not matter.

Methods

GetDecodeType()

Get the decoding method.

GetVocabulary()

Get the vocabulary for recognition.

Recognize(InputArray)

Given the @p input frame, create input blob, run net and return recognition result.

Recognize(InputArray, IEnumerable<Rect>)

Given the @p input frame, create input blob, run net and return recognition result for each ROI.

SetDecodeOptsCTCPrefixBeamSearch(int, int)

Set the decoding method options for "CTC-prefix-beam-search" decode usage.

SetDecodeType(string)

Set the decoding method of translating the network output into string.

SetVocabulary(IEnumerable<string>)

Set the vocabulary for recognition.