【发布时间】:2017-11-23 14:29:32
【问题描述】:
这里的文档页面上说:https://cloud.google.com/vision/docs/ocr,您可以指定语言提示以帮助 OCR 更准确地检测图像中的文本。有谁知道我会在我的代码中在哪里指定语言提示?我正在使用 .net 控制台应用程序对其进行编程。
using Google.Cloud.Vision.V1;
using System;
namespace GoogleCloudSamples
{
public class QuickStart
{
public static void Main(string[] args)
{
// Instantiates a client
var client = ImageAnnotatorClient.Create();
// Load the image file into memory
var image = Image.FromFile("wakeupcat.jpg");
// Performs label detection on the image file
var response = client.DetectLabels(image);
foreach (var annotation in response)
{
if (annotation.Description != null)
Console.WriteLine(annotation.Description);
}
}
}
}
我似乎无法访问 ImageContext 类的语言提示属性,因为它是只读的。有没有办法创建一个可以指定语言提示的 ImageContext?
【问题讨论】:
标签: google-cloud-platform ocr google-cloud-vision