Ask Your Question

Revision history [back]

Hi @rprevi

I have found that the OCR function bindings are only available in OpenCV 3.1.0. From my installation of OpenCV provided in this docker image : https://hub.docker.com/r/mlennox/docker-opencv/

Help on module cv2.text in cv2:

NAME
    cv2.text

FUNCTIONS
    OCRBeamSearchDecoder_create(...)
        OCRBeamSearchDecoder_create(classifier, vocabulary, transition_probabilities_table, emission_probabilities_table[, mode[, beam_size]]) -> retval

    OCRHMMDecoder_create(...)
        OCRHMMDecoder_create(classifier, vocabulary, transition_probabilities_table, emission_probabilities_table[, mode]) -> retval

    OCRTesseract_create(...)
        OCRTesseract_create([, datapath[, language[, char_whitelist[, oem[, psmode]]]]]) -> retval

    createOCRHMMTransitionsTable(...)
        createOCRHMMTransitionsTable(vocabulary, lexicon) -> retval

    loadOCRBeamSearchClassifierCNN(...)
        loadOCRBeamSearchClassifierCNN(filename) -> retval

    loadOCRHMMClassifierCNN(...)
        loadOCRHMMClassifierCNN(filename) -> retval

    loadOCRHMMClassifierNM(...)
        loadOCRHMMClassifierNM(filename) -> retval

DATA
    ERFILTER_NM_IHSGRAD = 1
    ERFILTER_NM_IHSGrad = 1
    ERFILTER_NM_RGBLGRAD = 0
    ERFILTER_NM_RGBLGrad = 0
    ERGROUPING_ORIENTATION_ANY = 1
    ERGROUPING_ORIENTATION_HORIZ = 0
    OCR_DECODER_VITERBI = 0
    OCR_LEVEL_TEXTLINE = 1
    OCR_LEVEL_WORD = 0

FILE
    (built-in)

I hope that helps