【发布时间】:2020-01-27 23:40:48
【问题描述】:
我在 Node.js 中使用 @google-cloud/vision
我使用如下示例代码
async function quickstart() {
try {
// Imports the Google Cloud client library
const vision = require('@google-cloud/vision');
// Creates a client
const client = new vision.ImageAnnotatorClient();
// Performs label detection on the image file
const [result] = await client.textDetection('./test.jpg');
const texts = result.textAnnotations;
console.log('Text:');
texts.forEach((text: string) => console.log(text));
} catch (err) {
console.log(err);
}
}
目前正在运行并返回英文文本和数字。我有 Vision API 的实验性语言的图像文本。如何将语言提示设置为 node.js API 中指定的文档?
【问题讨论】:
标签: node.js google-cloud-platform vision-api