我正在使用Google Cloud OCR从打印文档的图像中读取文本(当前),该文档使用client.text_detection()属性。但是,我想修改模型,以便它可以识别手写文本和打印文本。手写部分需要client.document_text_detection()属性。如何将两者结合?
答案 0 :(得分:0)
您只需要使用DOCUMENT_TEXT_DETECTION。
例如,选中我在Google搜索中找到的this image,其中既包含印刷文字也包含手写文字。我向Vision API发送了一个请求,要求指定功能DOCUMENT_TEXT_DETECTION,它成功返回了打印的文本和手写的文本(粗体):
“说明”:“ http://www.nasdaq.com/symbol/fb/historical \ n日期\ n01 / 04.2017 \ n01 / 03/2017 \ n12 / 30/2016 \ n1229 2016 \ n12 / 28/2016 \ n1227 / 2016 \ n12 / 23/2016 \ n12 / 22/2016 \ n1221 / 2016 \ n12 / 20/2016 \ n12 / 19/2016 \ n1206 7016 \ n 12/20/2016 \ nOpen \ n117.55 \ n116.03 \ n116,595 \ n117 \ n118.19 \ n116.96 \ n117 \ n118.86 \ n118.92 \ n119.5 \ n119.85 \ n120.9 \ n 121,1 \ n高\ n119.66 \ n117.84 \ n116.83 \ n117.531 \ n118.25 \ n118.68 \ n117.56 \ n118.99 \ n119.2 \ n119.77 \ n120.36 \ n121.5 \ n < strong> 123.5 \ n低\ n117.29 \ n115.51 \ n114.7739 \ n116.06 \ n116.65 \ n116.864 \ n116.3 \ n116.93 \ n118.48 \ n118.8 \ n118.51 \ n119.27 \ n 119.22 \ n关闭/最后一个\ n118.69 \ n116.86 \ n115.05 \ n116.35 \ n116.92 \ n118.01 \ n117.27 \ n117.4 \ n119.04 \ n119.09 \ n119.24 \ n119.87 \ n 119.87 \ n卷\ n19.594,560 \ n20.635,600 \ n18.668.290 \ n9,925,082 \ n11。 985.740 \ n12,034,590 \ n10,885,030 \ n16.226,770 \ n10,747,610 \ n13,673,570 \ n15,871,360 \ n25,316,220 \ n 25,316,220 \ n“,