You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CV_WRAP String run(InputArray image, int min_confidence, int component_level=0);
240
+
241
+
CV_WRAP String run(InputArray image, InputArray mask, int min_confidence, int component_level=0);
242
+
230
243
/** @brief Creates an instance of the OCRHMMDecoder class. Initializes HMMDecoder.
231
244
232
245
@param classifier The character classifier with built in feature extractor.
@@ -252,6 +265,15 @@ class CV_EXPORTS OCRHMMDecoder : public BaseOCR
252
265
// cols == rows == vocabulari.size()
253
266
decoder_mode mode = OCR_DECODER_VITERBI); // HMM Decoding algorithm (only Viterbi for the moment)
254
267
268
+
CV_WRAP static Ptr<OCRHMMDecoder> create(const Ptr<OCRHMMDecoder::ClassifierCallback> classifier,// The character classifier with built in feature extractor
269
+
const String& vocabulary, // The language vocabulary (chars when ascii english text)
270
+
// size() must be equal to the number of classes
271
+
InputArray transition_probabilities_table, // Table with transition probabilities between character pairs
272
+
// cols == rows == vocabulari.size()
273
+
InputArray emission_probabilities_table, // Table with observation emission probabilities
274
+
// cols == rows == vocabulari.size()
275
+
int mode = OCR_DECODER_VITERBI); // HMM Decoding algorithm (only Viterbi for the moment)
* - (C++) An alternative would be to load the default generic language transition table provided in the text module samples folder (created from ispell 42869 english words list) :
CV_WRAP String run(InputArray image, int min_confidence, int component_level=0);
403
+
404
+
CV_WRAP String run(InputArray image, InputArray mask, int min_confidence, int component_level=0);
405
+
376
406
/** @brief Creates an instance of the OCRBeamSearchDecoder class. Initializes HMMDecoder.
377
407
378
408
@param classifier The character classifier with built in feature extractor.
@@ -401,6 +431,16 @@ class CV_EXPORTS OCRBeamSearchDecoder : public BaseOCR
401
431
decoder_mode mode = OCR_DECODER_VITERBI, // HMM Decoding algorithm (only Viterbi for the moment)
402
432
int beam_size = 500); // Size of the beam in Beam Search algorithm
403
433
434
+
CV_WRAP static Ptr<OCRBeamSearchDecoder> create(const Ptr<OCRBeamSearchDecoder::ClassifierCallback> classifier, // The character classifier with built in feature extractor
435
+
const String& vocabulary, // The language vocabulary (chars when ascii english text)
436
+
// size() must be equal to the number of classes
437
+
InputArray transition_probabilities_table, // Table with transition probabilities between character pairs
438
+
// cols == rows == vocabulari.size()
439
+
InputArray emission_probabilities_table, // Table with observation emission probabilities
440
+
// cols == rows == vocabulari.size()
441
+
int mode = OCR_DECODER_VITERBI, // HMM Decoding algorithm (only Viterbi for the moment)
442
+
int beam_size = 500); // Size of the beam in Beam Search algorithm
0 commit comments