【发布时间】:2021-02-10 09:36:30
【问题描述】:
我正在尝试使用 OpenCV 拍摄图片的一个区域,然后提取该文本。知道如何解决此错误吗?
roi = cv2.cvtColor(roi, cv2.COLOR_BGR2GRAY)
cv2.imshow('image2', roi)
cv2.waitKey(0)
response = client.text_detection(image=roi)
texts = response.text_annotations
string = texts[0].description
print(string)
【问题讨论】:
标签: python opencv ocr google-vision