gev2002 / react-native-vision-camera-text-recognition

https://www.npmjs.com/package/react-native-vision-camera-text-recognition
MIT License
45 stars 7 forks source link

unable to get the text from the image #7

Closed rajaneeshvommi closed 4 months ago

rajaneeshvommi commented 4 months ago

I am trying the photo recognition function but unable to process the image and get the text from it. please follow the below code

const processImageToText = async () => { try{ if (!sourceUri) { return; } const result = await PhotoRecognizer({ uri:sourceUri, }) if(result){ setTextFromImage(result) } }catch(error){ console.log(error, "error") } }; "dependencies": { "@bam.tech/react-native-image-resizer": "^3.0.10", "react": "18.2.0", "react-native": "0.74.2", "react-native-image-picker": "^7.1.2", "react-native-vision-camera": "^4.3.2", "react-native-vision-camera-text-recognition": "^3.0.4", "react-native-worklets-core": "^1.3.3" } I am getting below error this is the file path which I am trying get the text : file:///data/user/0/com.cameraapp/cache/rn_image_picker_lib_temp_2cf51127-b739-4e9b-8469-b042b72a5df0.png out put is this [Error: Error processing image] error

gev2002 commented 4 months ago

I am updated logic and now it's work without @bam.tech/react-native-image-resizer. Your problem is from permissions.