简体   繁体   中英

Firebase Text Recognition

I tried firebase ml kit and got error this 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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