我的错误在标题中进行了解释。我该如何解决这个问题?我似乎找不到任何循环导入,但无论如何我都会收到错误。是模块设计不好还是我做错了什么?
import easyocr
import argparse
import cv2
def cleanup_text(text):
# strip out non-ASCII text so we can draw the text on the image
# using OpenCV
return "".join([c if ord(c) < 128 else "" for c in text]).strip()
# construct the argument parser and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required=True,
help="path to input image to be OCR'd")
ap.add_argument("-l", "--langs", type=str, default="en",
help="comma separated list of languages to OCR")
ap.add_argument("-g", "--gpu", type=int, default=-1,
help="whether or not GPU should …Run Code Online (Sandbox Code Playgroud)