zsajjad / react-native-text-detector

Text Detector from image for react native using firebase MLKit on android and Tesseract on iOS
MIT License
221 stars 62 forks source link

RNTextDetector detectFromUri doesn't return detected text #11

Closed dreadful-dev closed 5 years ago

dreadful-dev commented 5 years ago

I've managed to get this library built and running on my device and I have my tessdata folder referenced correctly as described in the readme. RNTextDetector.detectFromUri seems to be detecting text, however the detect text isn't provided in the visionResp, only the bounding and position data for the detected text. Is there something else I need to do to get the text?

I've implemented the usage of RNTextDetector.detectFromUri based off of the BusinessCard sample project.

https://github.com/zsajjad/BusinessCard/blob/master/app/App.js#L98

Here are screenshots of the app and what is logged to the console. image

image

edit: I've also tried getting much clearer photos than the example, and that hasn't worked either.

dreadful-dev commented 5 years ago

Figured it out, i needed to select "copy to destination if needed" when referencing the tessdata folder

vaiden commented 4 years ago

In plain English: @dreadful-dev means that you should follow the this part of the installation guide, even if you've linked the lib automatically. The relevant Google repo for the tessdata that worked for me is this one.

You only need the relevant .traindata file.