OpenCV for Unity  2.6.0
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.9.0/index.html ) for the details of the argument of the method.
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
OpenCVForUnity.TextModule.OCRBeamSearchDecoder Class Reference

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

Inheritance diagram for OpenCVForUnity.TextModule.OCRBeamSearchDecoder:
OpenCVForUnity.TextModule.BaseOCR OpenCVForUnity.DisposableOpenCVObject OpenCVForUnity.DisposableObject

Public Member Functions

string run (Mat image, int min_confidence, int component_level)
 Recognize text using Beam Search. More...
 
string run (Mat image, int min_confidence)
 Recognize text using Beam Search. More...
 
string run (Mat image, Mat mask, int min_confidence, int component_level)
 
string run (Mat image, Mat mask, int min_confidence)
 
- Public Member Functions inherited from OpenCVForUnity.TextModule.BaseOCR
IntPtr getNativeObjAddr ()
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 
void ThrowIfDisposed ()
 

Static Public Member Functions

static new OCRBeamSearchDecoder __fromPtr__ (IntPtr addr)
 
static OCRBeamSearchDecoder create (OCRBeamSearchDecoder_ClassifierCallback classifier, string vocabulary, Mat transition_probabilities_table, Mat emission_probabilities_table, int mode, int beam_size)
 Creates an instance of the OCRBeamSearchDecoder class. Initializes HMMDecoder. More...
 
static OCRBeamSearchDecoder create (OCRBeamSearchDecoder_ClassifierCallback classifier, string vocabulary, Mat transition_probabilities_table, Mat emission_probabilities_table, int mode)
 Creates an instance of the OCRBeamSearchDecoder class. Initializes HMMDecoder. More...
 
static OCRBeamSearchDecoder create (OCRBeamSearchDecoder_ClassifierCallback classifier, string vocabulary, Mat transition_probabilities_table, Mat emission_probabilities_table)
 Creates an instance of the OCRBeamSearchDecoder class. Initializes HMMDecoder. More...
 
- Static Public Member Functions inherited from OpenCVForUnity.TextModule.BaseOCR
static BaseOCR __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject
 DisposableOpenCVObject ()
 
 DisposableOpenCVObject (IntPtr ptr)
 
 DisposableOpenCVObject (bool isEnabledDispose)
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 
 DisposableObject (bool isEnabledDispose)
 

Additional Inherited Members

- Properties inherited from OpenCVForUnity.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Detailed Description

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

Note

Member Function Documentation

◆ __fromPtr__()

static new OCRBeamSearchDecoder OpenCVForUnity.TextModule.OCRBeamSearchDecoder.__fromPtr__ ( IntPtr  addr)
static

◆ create() [1/3]

static OCRBeamSearchDecoder OpenCVForUnity.TextModule.OCRBeamSearchDecoder.create ( OCRBeamSearchDecoder_ClassifierCallback  classifier,
string  vocabulary,
Mat  transition_probabilities_table,
Mat  emission_probabilities_table,
int  mode,
int  beam_size 
)
static

Creates an instance of the OCRBeamSearchDecoder class. Initializes HMMDecoder.

Parameters
classifierThe character classifier with built in feature extractor.
vocabularyThe language vocabulary (chars when ASCII English text). vocabulary.size() must be equal to the number of classes of the classifier.
transition_probabilities_tableTable with transition probabilities between character pairs. cols == rows == vocabulary.size().
emission_probabilities_tableTable with observation emission probabilities. cols == rows == vocabulary.size().
modeHMM Decoding algorithm. Only OCR_DECODER_VITERBI is available for the moment (<http://en.wikipedia.org/wiki/Viterbi_algorithm&gt;).
beam_sizeSize of the beam in Beam Search algorithm.

◆ create() [2/3]

static OCRBeamSearchDecoder OpenCVForUnity.TextModule.OCRBeamSearchDecoder.create ( OCRBeamSearchDecoder_ClassifierCallback  classifier,
string  vocabulary,
Mat  transition_probabilities_table,
Mat  emission_probabilities_table,
int  mode 
)
static

Creates an instance of the OCRBeamSearchDecoder class. Initializes HMMDecoder.

Parameters
classifierThe character classifier with built in feature extractor.
vocabularyThe language vocabulary (chars when ASCII English text). vocabulary.size() must be equal to the number of classes of the classifier.
transition_probabilities_tableTable with transition probabilities between character pairs. cols == rows == vocabulary.size().
emission_probabilities_tableTable with observation emission probabilities. cols == rows == vocabulary.size().
modeHMM Decoding algorithm. Only OCR_DECODER_VITERBI is available for the moment (<http://en.wikipedia.org/wiki/Viterbi_algorithm&gt;).
beam_sizeSize of the beam in Beam Search algorithm.

◆ create() [3/3]

static OCRBeamSearchDecoder OpenCVForUnity.TextModule.OCRBeamSearchDecoder.create ( OCRBeamSearchDecoder_ClassifierCallback  classifier,
string  vocabulary,
Mat  transition_probabilities_table,
Mat  emission_probabilities_table 
)
static

Creates an instance of the OCRBeamSearchDecoder class. Initializes HMMDecoder.

Parameters
classifierThe character classifier with built in feature extractor.
vocabularyThe language vocabulary (chars when ASCII English text). vocabulary.size() must be equal to the number of classes of the classifier.
transition_probabilities_tableTable with transition probabilities between character pairs. cols == rows == vocabulary.size().
emission_probabilities_tableTable with observation emission probabilities. cols == rows == vocabulary.size().
modeHMM Decoding algorithm. Only OCR_DECODER_VITERBI is available for the moment (<http://en.wikipedia.org/wiki/Viterbi_algorithm&gt;).
beam_sizeSize of the beam in Beam Search algorithm.

◆ Dispose()

override void OpenCVForUnity.TextModule.OCRBeamSearchDecoder.Dispose ( bool  disposing)
protectedvirtual

Reimplemented from OpenCVForUnity.TextModule.BaseOCR.

◆ run() [1/4]

string OpenCVForUnity.TextModule.OCRBeamSearchDecoder.run ( Mat  image,
int  min_confidence,
int  component_level 
)

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
imageInput binary image CV_8UC1 with a single text line (or word).
output_textOutput text. Most likely character sequence found by the HMM decoder.
component_rectsIf provided the method will output a list of Rects for the individual text elements found (e.g. words).
component_textsIf provided the method will output a list of text strings for the recognition of individual text elements found (e.g. words).
component_confidencesIf provided the method will output a list of confidence values for the recognition of individual text elements found (e.g. words).
component_levelOnly OCR_LEVEL_WORD is supported.

◆ run() [2/4]

string OpenCVForUnity.TextModule.OCRBeamSearchDecoder.run ( Mat  image,
int  min_confidence 
)

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
imageInput binary image CV_8UC1 with a single text line (or word).
output_textOutput text. Most likely character sequence found by the HMM decoder.
component_rectsIf provided the method will output a list of Rects for the individual text elements found (e.g. words).
component_textsIf provided the method will output a list of text strings for the recognition of individual text elements found (e.g. words).
component_confidencesIf provided the method will output a list of confidence values for the recognition of individual text elements found (e.g. words).
component_levelOnly OCR_LEVEL_WORD is supported.

◆ run() [3/4]

string OpenCVForUnity.TextModule.OCRBeamSearchDecoder.run ( Mat  image,
Mat  mask,
int  min_confidence,
int  component_level 
)

◆ run() [4/4]

string OpenCVForUnity.TextModule.OCRBeamSearchDecoder.run ( Mat  image,
Mat  mask,
int  min_confidence 
)

The documentation for this class was generated from the following file: