def recognize_from_content(conf):
    api = OcrApi(conf)
    params = Parameters(LanguageGroup.ENGLISH, ResultType.Text, False, False,
                        DSRPipeline.DsrNoFilter, DSRConfidence.Mid, False)

    res = api.post_recognize_from_content('testdata/5.png', params)
    print(res.text)
示例#2
0
def ocr_send_file(configuration):
    # Instantiate API Class
    api = OcrApi(configuration)
    params = Parameters(LanguageGroup.ENGLISH, ResultType.Text, False, False,
                        DSRPipeline.DsrNoFilter, DSRConfidence.Mid, False)
    # Send request (Only English language supported for this request type)
    res = api.post_recognize_from_content(r"..\testdata\de_1.jpg", params)
    print(res.text)