Closed tdouguo closed 2 years ago
from cnstd import CnStd from cnocr import CnOcr
std = CnStd() cn_ocr = CnOcr()
box_infos = std.detect('examples/taobao.jpg')
for box_info in box_infos['detected_texts']: cropped_img = box_info['cropped_img'] ocr_res = cn_ocr.ocr_for_single_line(cropped_img) print('ocr result: %s' % str(ocr_out))
ocr_out变量没有 和pring的时候应该是 使用的 ocr_res 变量吧
from cnstd import CnStd from cnocr import CnOcr
std = CnStd() cn_ocr = CnOcr()
box_infos = std.detect('examples/taobao.jpg')
for box_info in box_infos['detected_texts']: cropped_img = box_info['cropped_img'] ocr_res = cn_ocr.ocr_for_single_line(cropped_img) print('ocr result: %s' % str(ocr_out))
ocr_out变量没有 和pring的时候应该是 使用的 ocr_res 变量吧