如何使用计算机视觉API分析流数据?

时间:2020-02-05 11:11:21

标签: python python-3.x azure-cognitive-services

我正在使用Python输入base64字符串,并使用Azure Computer Vision API对其进行分析。如何格式化base64字符串以将其接受为流文件?

这是传递字符串的地方:

recognize_printed_results = computervision_client.batch_read_file_in_stream(ImageReqBody['Stream'], raw=True)

这是我得到的错误

Exception: AttributeError: 'str' object has no attribute 'read'

ImageReqBody 是我用来输入图像字符串的Json对象。

batch_read_file_in_stream()函数可以接受的格式是什么?

0 个答案:

没有答案