【发布时间】:2019-08-04 04:54:43
【问题描述】:
我项目的一个目标是使用 AWS Rekognition 从流式视频中检测文本。
我一直在尝试搜索 AWS 文档。 AWS 似乎允许开发人员仅从存储的图像中提取文本。
请参阅此 AWS 文档 - detect text in a Image
AWS 文档提供了以下代码来检测 Image 中的文本。这段代码基本上有detect_text API,它将来自 S3 的存储图像作为输入,并从图像中输出检测到的文本。
我的问题是 -- 是否有任何方法可以使用 AWs Rekognition 从流式视频中提取文本?或者我可以说目前无法使用 AWS Rekognition 从流式视频中提取文本吗?
让我知道解决此目标的任何方法。
import boto3
if __name__ == "__main__":
bucket='bucket'
photo='text.png'
client=boto3.client('rekognition')
response=client.detect_text(Image={'S3Object':{'Bucket':bucket,'Name':photo}})
textDetections=response['TextDetections']
print ('Detected text')
for text in textDetections:
print ('Detected text:' + text['DetectedText'])
print ('Confidence: ' + "{:.2f}".format(text['Confidence']) + "%")
print ('Id: {}'.format(text['Id']))
if 'ParentId' in text:
print ('Parent Id: {}'.format(text['ParentId']))
print ('Type:' + text['Type'])
print
【问题讨论】:
标签: amazon-web-services amazon-s3 lambda amazon-kinesis amazon-rekognition