【发布时间】:2020-11-28 22:08:13
【问题描述】:
我目前正在尝试从几张图片中读取文本,似乎 google api 正在跳过一些 0。
代码如下:
Google.Cloud.Vision.V1.Image image = Google.Cloud.Vision.V1.Image.FromFile(imagepath);
ImageAnnotatorClient client = ImageAnnotatorClient.Create();
IReadOnlyList<EntityAnnotation> response = client.DetectText(image);
string test = string.Empty;
foreach (EntityAnnotation annotation in response)
{
if (annotation.Description != null)
{
Console.WriteLine(annotation.Description);
test += Environment.NewLine + annotation.Description;
}
}
这是它正在尝试的图像:Attempt 1Attempt 2Attempt 3
是否需要更改设置以使其接受 0?
这也是
的输出
尝试1:https://pastebin.com/dNxRt7QK
results above
尝试 2:https://pastebin.com/XVZzmtTg
results above
尝试 3:https://pastebin.com/2kQMiC8h
results above
它真的很擅长阅读所有内容,但它真的很讨厌阅读 0。 特别是在尝试 2/3 中的死亡。
【问题讨论】: