尝试使用node使用vision api运行标签检测:
msgsnd
连续收到错误:“未定义ImageAnnotatorClient” 有什么理由吗?
答案 0 :(得分:2)
您可以尝试修改该行:
console.log(serverUrl);
let headers = this.createRequestHeader();
let token_value = localStorage.getItem('access_token')
let url;
var filter;
filter = '{"limit":"10","skip":"0"}'
url = this.apiUrl + serverUrl + '?token=' + token_value + '&filter=' + filter
return this.http.get(url, { headers: headers })
.map(res => res.json());
}
有:
const client = new ImageAnnotatorClient({
ImageAnnotatorClient方法是从您导入为const client = new vision.ImageAnnotatorClient({
变量的Cloud Vision API中提取的。