OCRBeamSearchDecoder class provides an interface for OCR using Beam Search algorithm.
More...
|
string | run (Mat image, int min_confidence) |
| Recognize text using Beam Search.
|
|
string | run (Mat image, int min_confidence, int component_level) |
| Recognize text using Beam Search.
|
|
string | run (Mat image, Mat mask, int min_confidence) |
|
string | run (Mat image, Mat mask, int min_confidence, int component_level) |
|
IntPtr | getNativeObjAddr () |
|
void | Dispose () |
|
void | ThrowIfDisposed () |
|
|
static new OCRBeamSearchDecoder | __fromPtr__ (IntPtr addr) |
|
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.
|
|
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.
|
|
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.
|
|
static BaseOCR | __fromPtr__ (IntPtr addr) |
|
static IntPtr | ThrowIfNullIntPtr (IntPtr ptr) |
|
OCRBeamSearchDecoder class provides an interface for OCR using Beam Search algorithm.
- Note
-
◆ __fromPtr__()
static new OCRBeamSearchDecoder OpenCVForUnity.TextModule.OCRBeamSearchDecoder.__fromPtr__ |
( |
IntPtr | addr | ) |
|
|
static |
◆ create() [1/3]
Creates an instance of the OCRBeamSearchDecoder class. Initializes HMMDecoder.
- Parameters
-
classifier | The character classifier with built in feature extractor. |
vocabulary | The language vocabulary (chars when ASCII English text). vocabulary.size() must be equal to the number of classes of the classifier. |
transition_probabilities_table | Table with transition probabilities between character pairs. cols == rows == vocabulary.size(). |
emission_probabilities_table | Table with observation emission probabilities. cols == rows == vocabulary.size(). |
mode | HMM Decoding algorithm. Only OCR_DECODER_VITERBI is available for the moment (<http://en.wikipedia.org/wiki/Viterbi_algorithm>). |
beam_size | Size of the beam in Beam Search algorithm. |
◆ create() [2/3]
Creates an instance of the OCRBeamSearchDecoder class. Initializes HMMDecoder.
- Parameters
-
classifier | The character classifier with built in feature extractor. |
vocabulary | The language vocabulary (chars when ASCII English text). vocabulary.size() must be equal to the number of classes of the classifier. |
transition_probabilities_table | Table with transition probabilities between character pairs. cols == rows == vocabulary.size(). |
emission_probabilities_table | Table with observation emission probabilities. cols == rows == vocabulary.size(). |
mode | HMM Decoding algorithm. Only OCR_DECODER_VITERBI is available for the moment (<http://en.wikipedia.org/wiki/Viterbi_algorithm>). |
beam_size | Size of the beam in Beam Search algorithm. |
◆ create() [3/3]
Creates an instance of the OCRBeamSearchDecoder class. Initializes HMMDecoder.
- Parameters
-
classifier | The character classifier with built in feature extractor. |
vocabulary | The language vocabulary (chars when ASCII English text). vocabulary.size() must be equal to the number of classes of the classifier. |
transition_probabilities_table | Table with transition probabilities between character pairs. cols == rows == vocabulary.size(). |
emission_probabilities_table | Table with observation emission probabilities. cols == rows == vocabulary.size(). |
mode | HMM Decoding algorithm. Only OCR_DECODER_VITERBI is available for the moment (<http://en.wikipedia.org/wiki/Viterbi_algorithm>). |
beam_size | Size of the beam in Beam Search algorithm. |
◆ Dispose()
override void OpenCVForUnity.TextModule.OCRBeamSearchDecoder.Dispose |
( |
bool | disposing | ) |
|
|
protectedvirtual |
◆ run() [1/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
-
image | Input binary image CV_8UC1 with a single text line (or word). |
output_text | Output text. Most likely character sequence found by the HMM decoder. |
component_rects | If provided the method will output a list of Rects for the individual text elements found (e.g. words). |
component_texts | If provided the method will output a list of text strings for the recognition of individual text elements found (e.g. words). |
component_confidences | If provided the method will output a list of confidence values for the recognition of individual text elements found (e.g. words). |
component_level | Only OCR_LEVEL_WORD is supported. |
◆ run() [2/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
-
image | Input binary image CV_8UC1 with a single text line (or word). |
output_text | Output text. Most likely character sequence found by the HMM decoder. |
component_rects | If provided the method will output a list of Rects for the individual text elements found (e.g. words). |
component_texts | If provided the method will output a list of text strings for the recognition of individual text elements found (e.g. words). |
component_confidences | If provided the method will output a list of confidence values for the recognition of individual text elements found (e.g. words). |
component_level | Only OCR_LEVEL_WORD is supported. |
◆ run() [3/4]
string OpenCVForUnity.TextModule.OCRBeamSearchDecoder.run |
( |
Mat | image, |
|
|
Mat | mask, |
|
|
int | min_confidence ) |
◆ run() [4/4]
string OpenCVForUnity.TextModule.OCRBeamSearchDecoder.run |
( |
Mat | image, |
|
|
Mat | mask, |
|
|
int | min_confidence, |
|
|
int | component_level ) |
The documentation for this class was generated from the following file: