我使用的反应-本机-火基-mlkit视觉处理从相机拍摄的图像(使用反应-本机-相机)。文本检测是计费所必需的,但防火墙文档显示,设备上的检测是免费的。这是我正在使用的片段
processImage = async () => {
const {photoUri} = this.state;
console.log('processing Image...');
vision()
.cloudTextRecognizerProcessImage(photoUri)
.then(processed => {
console.log('processImage response', processed);
})
.catch(error => {
console.log('process error', error);
});
};这是错误

我如何激活设备检测与反应-本机-火力基-mlkit视觉?
发布于 2019-11-24 11:40:05
好吧我已经弄清楚了。对于设备上的,使用react本机防火墙-mlkit的,您必须使用textRecognizerProcessImage()函数而不是cloudTextRecognizerProcessImage()。
processImage = async () => {
const {photoUri} = this.state;
console.log('processing Image...');
vision()
.textRecognizerProcessImage(photoUri)
.then(processed => {
console.log('processImage response', processed);
})
.catch(error => {
console.log('process error', error);
});
};https://stackoverflow.com/questions/59016883
复制相似问题