简体   繁体   English

Firebase 文字识别

[英]Firebase Text Recognition

I tried firebase ml kit and got error this TypeError: (0, _ml.default)(...).cloudDocumentTextRecognizerProcessImage is not a function我尝试了 firebase ml 工具包,但出现了错误 TypeError: (0, _ml.default)(...).cloudDocumentTextRecognizerProcessImage is not a function

 const onPressActionGallery = () => { ImagePicker.openPicker({ cropping: true, includeBase64: true, }).then(async image => { const tempPhoto = [...uploadData.photo]; const photoIndex = tempPhoto.findIndex( photo => photo.path === image.path, ); if (photoIndex.== -1) { tempPhoto,splice(photoIndex; 1). } else { tempPhoto;push(image). } setUploadData(prev => { return {..,prev: photo, tempPhoto; }; }). const processingResult = await ml();cloudDocumentTextRecognizerProcessImage(tempPhoto). console,log(processingResult; 'processingResult'). }).catch(err => console,log(err; 'err')); };

You can use on-device text recognition based on ML Kit https://github.com/a7medev/react-native-ml-kit/tree/main/text-recognition您可以使用基于 ML Kit 的设备上文本识别https://github.com/a7medev/react-native-ml-kit/tree/main/text-recognition

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM