Package org.opencv.text
Class OCRHMMDecoder
- java.lang.Object
- 
- org.opencv.text.BaseOCR
- 
- org.opencv.text.OCRHMMDecoder
 
 
- 
 public class OCRHMMDecoder extends BaseOCR OCRHMMDecoder class provides an interface for OCR using Hidden Markov Models. Note:- (C++) An example on using OCRHMMDecoder recognition combined with scene text detection can be found at the webcam_demo sample: <https://github.com/opencv/opencv_contrib/blob/master/modules/text/samples/webcam_demo.cpp>
 
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedOCRHMMDecoder(long addr)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OCRHMMDecoder__fromPtr__(long addr)static OCRHMMDecodercreate(java.lang.String filename, java.lang.String vocabulary, Mat transition_probabilities_table, Mat emission_probabilities_table)Creates an instance of the OCRHMMDecoder class.static OCRHMMDecodercreate(java.lang.String filename, java.lang.String vocabulary, Mat transition_probabilities_table, Mat emission_probabilities_table, int mode)Creates an instance of the OCRHMMDecoder class.static OCRHMMDecodercreate(java.lang.String filename, java.lang.String vocabulary, Mat transition_probabilities_table, Mat emission_probabilities_table, int mode, int classifier)Creates an instance of the OCRHMMDecoder class.protected voidfinalize()java.lang.Stringrun(Mat image, int min_confidence)Recognize text using HMM.java.lang.Stringrun(Mat image, int min_confidence, int component_level)Recognize text using HMM.java.lang.Stringrun(Mat image, Mat mask, int min_confidence)java.lang.Stringrun(Mat image, Mat mask, int min_confidence, int component_level)- 
Methods inherited from class org.opencv.text.BaseOCRgetNativeObjAddr
 
- 
 
- 
- 
- 
Method Detail- 
__fromPtr__public static OCRHMMDecoder __fromPtr__(long addr) 
 - 
runpublic java.lang.String run(Mat image, int min_confidence, int component_level) Recognize text using HMM. Takes an image and a mask (where each connected component corresponds to a segmented character) 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 image CV_8UC1 or CV_8UC3 with a single text line (or word). text elements found (e.g. words). recognition of individual text elements found (e.g. words). for the recognition of individual text elements found (e.g. words).
- component_level- Only OCR_LEVEL_WORD is supported.
- min_confidence- automatically generated
- Returns:
- automatically generated
 
 - 
runpublic java.lang.String run(Mat image, int min_confidence) Recognize text using HMM. Takes an image and a mask (where each connected component corresponds to a segmented character) 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 image CV_8UC1 or CV_8UC3 with a single text line (or word). text elements found (e.g. words). recognition of individual text elements found (e.g. words). for the recognition of individual text elements found (e.g. words).
- min_confidence- automatically generated
- Returns:
- automatically generated
 
 - 
createpublic static OCRHMMDecoder create(java.lang.String filename, java.lang.String vocabulary, Mat transition_probabilities_table, Mat emission_probabilities_table, int mode, int classifier) Creates an instance of the OCRHMMDecoder class. Loads and initializes HMMDecoder from the specified path- Parameters:
- filename- automatically generated
- vocabulary- automatically generated
- transition_probabilities_table- automatically generated
- emission_probabilities_table- automatically generated
- mode- automatically generated
- classifier- automatically generated
- Returns:
- automatically generated
 
 - 
createpublic static OCRHMMDecoder create(java.lang.String filename, java.lang.String vocabulary, Mat transition_probabilities_table, Mat emission_probabilities_table, int mode) Creates an instance of the OCRHMMDecoder class. Loads and initializes HMMDecoder from the specified path- Parameters:
- filename- automatically generated
- vocabulary- automatically generated
- transition_probabilities_table- automatically generated
- emission_probabilities_table- automatically generated
- mode- automatically generated
- Returns:
- automatically generated
 
 - 
createpublic static OCRHMMDecoder create(java.lang.String filename, java.lang.String vocabulary, Mat transition_probabilities_table, Mat emission_probabilities_table) Creates an instance of the OCRHMMDecoder class. Loads and initializes HMMDecoder from the specified path- Parameters:
- filename- automatically generated
- vocabulary- automatically generated
- transition_probabilities_table- automatically generated
- emission_probabilities_table- automatically generated
- Returns:
- automatically generated
 
 
- 
 
-