jonathanpalma / react-native-tesseract-ocr Goto Github PK
View Code? Open in Web Editor NEWTesseract OCR wrapper for React Native
License: MIT License
Tesseract OCR wrapper for React Native
License: MIT License
Implement whitelist (List of characters you want to detect)
is there an API for this?
I have the following problem when running directly on my mobile phone (Nexus 6p):
import RNTesseractOcr from 'react-native-tesseract-ocr';
/**
* @param {string} imgPath - The path of the image.
* @param {string} lang - The language you want to process.
*/
RNTesseractOcr.startOcr(imgPath, lang)
.then((result) => {
this.setState({ ocrResult: result });
console.log("OCR Result: ", result);
})
.catch((err) => {
console.log("OCR Error: ", err);
})
.done();
Any idea what to do for this? Or how can I troubleshoot? Once the issue happens, I cannot do anything on my app anymore...all links are not working. Not sure what is the problem.
Thanks!
Bogdan
is it possilble to use it with math formulas? Or should i train my own data?
I have to translate the Gujarati language text, So i change to LANG_CUSTOM in RNTesseractOcr.recognize
, and add custom.traineddata
into android/app/src/main/assets/tessdata
.
Now when I try to pick Gujarati text image the app is crashed.
import React, { Component } from 'react';
import {
ActivityIndicator,
Image,
Platform,
Text,
TouchableNativeFeedback,
TouchableOpacity,
View,
PixelRatio
} from 'react-native';
import ImagePicker from 'react-native-image-picker';
import RNTesseractOcr from 'react-native-tesseract-ocr';
import styles from '../../styles';
const Button = (Platform.OS === 'android') ? TouchableNativeFeedback : TouchableOpacity;
const imagePickerOptions = {
quality: 1.0,
maxWidth: 500,
maxHeight: 500,
storageOptions: {
skipBackup: true,
},
};
const tessOptions = {
whitelist: null,
blacklist: null
};
class ImagePickerScreen extends Component {
constructor(props) {
super(props);
this.state = {
errorMessage: null,
extractedText: null,
hasErrored: false,
imageSource: null,
isLoading: false,
};
this.selectImage = this.selectImage.bind(this);
}
selectImage() {
this.setState({ isLoading: true });
console.log("imagepic");
ImagePicker.showImagePicker(imagePickerOptions, (response) => {
console.log('response',response);
if (response.didCancel) {
this.setState({ isLoading: false });
} else if (response.error) {
this.setState({ isLoading: false, hasErrored: true, errorMessage: response.error });
} else {
const source = { uri: response.uri };
this.setState({ imageSource: source, hasErrored: false, errorMessage: null }, this.extractTextFromImage(response.path));
}
});
}
extractTextFromImage(imagePath) {
console.log('imgpath', imagePath)
RNTesseractOcr.recognize(imagePath, 'LANG_CUSTOM', tessOptions)
.then((result) => {
console.log('result',result);
this.setState({ isLoading: false, extractedText: result });
})
.catch((err) => {
console.log('error',err);
this.setState({ hasErrored: true, errorMessage: err.message });
});
}
render() {
const { errorMessage, extractedText, hasErrored, imageSource, isLoading } = this.state;
return (
<View style={styles.container}>
<Button onPress={this.selectImage} >
<View style={[styles.image, styles.imageContainer, !imageSource && styles.rounded]}>
{
imageSource === null
? <Text>Tap me!</Text>
: <Image style={styles.image} source={imageSource} />
}
</View>
</Button>
{
isLoading
? <ActivityIndicator size="large" />
: (
hasErrored
? <Text>{errorMessage}</Text>
: <Text>{extractedText}</Text>
)
}
</View>
);
}
}
ImagePickerScreen.navigationOptions = {
title: 'Image Picker Example',
};
export default ImagePickerScreen;
"react": "16.6.3",
"react-native": "0.57.8",
"react-native-gesture-handler": "^1.0.12",
"react-native-image-picker": "^0.28.0",
"react-native-tesseract-ocr": "^1.0.10",
"react-navigation": "^3.0.9"
Please help me,
Thanks in advance
Please help me out. I am gettting this error while in catch.
Hi!
I need to develop a module in React Native that does license plate recognition. I'm from Brazil. Can i use this project to do this? My input is a photo from an android device.
sorry my bad English,
Thanks :)
hi,
i tried to run the example app. I take a photo, but the spinner is always loading. It doesnt get ready. Why?
Thanks for your job.
Is there any plan for iOS?
i'm getting this error as log with english traineddata
the complete error is
'OCR Error: ', { [Error: Failed to read bitmap] framesToPop: 1, code: 'An error occurred' }
Does this project or will this project work with Expo? I'm building my app in Expo and the setup guide says I need to add things in xCode and the Android Manifest file. I'm not familiar with that process since I use Expo so I'm curious if this does or will work with Expo in the future. Thanks!
Is there an option to cancel the OCR request before it is finished?
Keep getting error
03-22 07:04:04.571 3226 3353 I ReactNativeJS: 'OCR Error: ', { [Error: Failed to read bitmap] framesToPop: 1, code: 'An error occurred' }
It is a simple project. react-native init, and then just installed react-native-tesseract-ocr.
And then I added text.png image in /images/ directory under project root directory and called below code in componentDidMount function.
RNTesseractOcr.startOcr('./images/text.png', 'LANG_ENGLISH')
.then((result) => {
console.log("OCR Result: ", result);
})
.catch((err) => {
console.log("OCR Error: ", err);
})
.done();
Any suggestions?
Hi, which files are neccessary for the OCR to work with Swedish? I downloaded the swe... file but it seems it doesn't work. Do I need the whole /tessdata folder with every language - or is it enough to just use a couple of them?
Hello,
I have expo app. I've detatched project to get Android files. After, I used link command.
Now in my MainApplication.java i have proper code lines for import and returning new RNTesseractOcrPackage(). Now when i'm trying to use it in my app RNTesseractOcr is undefined. I have proper impoer statement and it is still not working, please help.
I copy eng....to the right place. and use the ENGLISH to recoglize. but when it picked the pickture,it would drop out of the app
OCR error Error: Failed to read bitmap
at createErrorFromErrorData (E:\reactNativeProjects\MassFrame\node_modules\react-native\Libraries\BatchedBridge\NativeModules.js:152)
at E:\reactNativeProjects\MassFrame\node_modules\react-native\Libraries\BatchedBridge\NativeModules.js:104
at MessageQueue.__invokeCallback (E:\reactNativeProjects\MassFrame\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:442)
at E:\reactNativeProjects\MassFrame\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:127
at MessageQueue.__guard (E:\reactNativeProjects\MassFrame\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:343)
at MessageQueue.invokeCallbackAndReturnFlushedQueue (E:\reactNativeProjects\MassFrame\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:126)
at debuggerWorker.js:80
I was trying your sample, And i keep getting this error for file not found.
PATH - /storage/emulated/0/Pictures/image-ea1f7b95-141a-4d44-bc8f-8b76552833ed.jpg
Timeline: Activity_idle id: android.os.BinderProxy@c792cf time:191950033
25747-25918/com.ammobile D/RNTesseractOcr: Preparing tesseract enviroment
25747-25918/com.ammobile I/RNTesseractOcr: Created directory /storage/emulated/0/com.ammobile/tessdata
25747-25918/com.ammobile D/RNTesseractOcr: Start ocr images
25747-25918/com.ammobile E/RNTesseractOcr: Data file not found at /storage/emulated/0/com.ammobile/tessdata/eng.traineddata
25747-25917/com.ammobile I/ReactNativeJS: 'OCR Error: ', { [Error: Data file not found at /storage/emulated/0/com.ammobile/tessdata/eng.traineddata] framesToPop: 1, code: 'An error occurred' }
What this can happened ?
this is my code
takePicture = async function() { if (this.camera) { const options = { quality: 0.5, base64: true }; const data = await this.camera.takePictureAsync(options) console.log(data.uri); this.setState({path: data.uri}); const tessOptions = { whitelist: null, blacklist: '1234567890\'!"#$%&/()={}[]+*-_:;<>' }; RNTesseractOcr.recognize(data.uri, 'LANG_ENGLISH', tessOptions) .then((result) => { // this.setState({ ocrResult: result }); console.log("OCR Result: ", result); }) .catch((err) => { console.log("OCR Error: ", err); }) .done(); } };
this is the error
OCR Error: Error: Data path does not exist!
at createErrorFromErrorData (D:\React Native\alternote\node_modules\react-native\Libraries\BatchedBridge\NativeModules.js:121)
at D:\React Native\alternote\node_modules\react-native\Libraries\BatchedBridge\NativeModules.js:78
at MessageQueue.__invokeCallback (D:\React Native\alternote\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:398)
at D:\React Native\alternote\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:137
at MessageQueue.__guardSafe (D:\React Native\alternote\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:314)
at MessageQueue.invokeCallbackAndReturnFlushedQueue (D:\React Native\alternote\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:136)
at debuggerWorker.js:70
i put my tess data in src/main/assets/tessdata but not working
Hi, when I tried to install the library with npm install react-native-tesseract-ocr --save
, I got an error:
├── UNMET PEER DEPENDENCY [email protected]
└── [email protected]
my react-native
version was 0.34, so I've updated it to 0.34.1, and the result is the same.
I installed package with required steps such as installing pods and linking but still getting this error. I have no idea how to solve it.
This error occurs in RNTesseractOcr.xcodeproj/RNTesseractOcr.h/RNTesseractOcr
#import "RCTBridgeModule.h"
#import "RNTesseractOcr.h"
@interface RNTesseractOcr : NSObject <RCTBridgeModule, G8TesseractDelegate>
any ideas how to solve it?
that would be great help
Running on Android 6.0.1 I get the above error
OCR Error: Error: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference
when invoking
RNTesseractOcr.startOcr(data["path"], "eng")
.then((result) => {
console.log("OCR Result: ", result);
})
.catch((err) => {
console.log("OCR Error: ", err);
})
.done();
my data object looks like this
{path: "file:///data/user/0/com.scanocr/cache/IMG_20170914_1521561881209554.jpg"}
I don't need the text to translate to a different language, but is there a way to only just get the text from the image?
my app Crashed EveryTime I Use RNTesseractOcr.recognize.
this is my code:
ImagePicker.openCamera({
cropping: false,
compressImageMaxWidth: 1600,
}).then(image => {
console.log(image);
const imagePath = image.path;
this.setState({
url: imagePath
});
const tessOptions = {
whitelist: null,
blacklist: '1234567890\'!"#$%&/()={}[]+*-_:;<>'
};
path = imagePath.replace('file://', '');
console.log('data path', path);
RNTesseractOcr.recognize(path, 'LANG_ENGLISH', tessOptions)
.then((result) => {
this.setState({ ocrResult: result });
console.log("OCR Result: ", result);
})
.catch((err) => {
console.log("OCR Error: ", err);
})
.done();
}).catch(e => {
console.log(e);
});
Hello, I am getting extremely poor text outcome, something like 10%, pure gibberish, when running on Android. I must have placed the wrong eng.traineddata file OR in the wrong folder. I am running the tesseractOcrSample, demo, and added the eng.traineddata file here:
tesseractOcrSample/node_modules/react-native-tesseract-ocr/android/src/main/assets/tessdata/eng.traineddata
I took this eng.traineddata file from tesseract.js nodeJS module (located in tesseract.js-core/examples/canvas/eng.traineddata
)
do I need to place it in another folder? Or do I need another file altogether? What Tesseract version is running in this Android module? Do I need to 'extract' anything?
Thanks very much in advance, also for your work.
John
I tried this in android project but it doesn't read properly. And also it reads black font only.any comments?
Hi when i run the run-android command i have this error
What went wrong:
Execution failed for task ':react-native-image-picker:processReleaseResources'.
com.android.ide.common.process.ProcessException: Failed to execute aapt
Error: Data file not found at /storage/emulated/0/com.ocr/tessdata/eng.traineddata
I have added pod 'TesseractOCRiOS', '4.0.0' in the Podfile and pod install it in ios folder but getting this error.
iOS Error after selecting picture
undefined is not an object (evaluating '_reactNativeTesseractOcr2.default.recognize')
Hi @jonathanpalma ,
I've tried using your libs, but it appears this error.
I follow your installation step by step.
I'm a newbie in react-native and ios.
Hope you will help me to resolve this. Thank you!~~
please help
i follow ......../asset/tessdata but not working android
Hi
I have problem with sdk.
Do you update sdk in project?
com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Failed to finalize session : -26: Package com.example new target SDK 22 doesn't support runtime permissions but the old target SDK 25 does.
Seems RNTesseractOcr is blocking the UI.
I tried with TesseractOcrSample you have provided, 'cancel recognition' Button not respond.
(it should be able to run in background)
Hello to all.
I just downloaded the example and did:
also, I had an issue because the mainapplication.java inside of library was overriding a method which does not derive from superclass, I just commented override keyword so i can compile it.
The below code never executes .then(result) or .catch(err)
RNTesseractOcr.recognize(path, 'LANG_ENGLISH', tessOptions) .then((result) => { this.setState({ isLoading: false, ocrResult: result }); console.log('OCR Result: ', result); }) .catch((err) => { console.log('OCR Error: ', err); }) .done();
but when i change 'LANG_ENGLISH' to "eng" then it throws an error Attempt to invoke virtual method 'java.lang.String ljava.lang.Object.toString()' on a null object reference.
Also, I want to use only ocr in english so i have copied eng.traindata in assets folder only and it does exists on my phone when i check.
Also, even if i get result sometime, it takes around 5 minutes and there are only random words that dont have to do anything with the content i have scanned.
(OCR Result: .. ‘I
”wilmwlgi‘yl I I I “IIIIIII‘I II
.. I. mgfuaslig‘IM . I‘ I In IIIII I
I MIMI?” fig I I ‘I’IIIIIIIIIIIEI‘SIIIIIIIIIéégis .
I ,M . . Hi I ~ I IIII’IfiEIIIsr‘II‘EIiM’IrféIgiii‘g‘ésifiéfié§I I I I
aIIIIIIIIIIIIIII I IIIIIIIs’.‘””Igugsigggfi II I I I I
I WazéiwifszInciIrIIIIIIIIIu.uI I I II‘I‘II"II““‘I‘II‘IIIIIII
‘ IIIIHI‘III II IIIII“II‘“IIIIIIIIIIIIIj
I III “ ‘ ““III“IIIIIagézeiZIfMII.’I
II ‘q?IffiWIIIIIgr.I I u I . W“IgIiifigggémiigzgyngagaitj,’
I w I I “‘IIII’IIIIIITIIII I IIIIIIIIIIIIIIIIIIIIIIIIIII I
lngIQEIIIIIM..?§£? ZIIIIEI’I ‘ ‘ EQIIEIZQ“II.IIE‘,IIII TV,“ I j I ‘ ~ . I “III VIIIIIIIIIIIIIIIIIII I I IIIIIIIIIIIIIIII I
wagifIze“ my hf‘ng‘iflfiffiiu mo‘ IiIIIIIIIIm‘EHIIiI‘II.jIw ’ I ‘i’ ‘ “I ”I ‘ ‘ i ‘ II’leiIIfliIIIII I I j “I IIIIII‘IIIIIIIIIIIIIC“ ..
I i‘lfim‘l’m”~ M I I I I I I I I I I I I I IIIIIIIIIIIIII I IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII I
“I III“???MI,”I .. I , I I I IIIIIIIIIIIIIIIIIIIIIIIII IIIIIIIIIIIIIIIIIII
‘ W IIIII‘IIIIIIIIIs I I I I I IIIIIIIIIIIIIIIIIIIIII I ’ IIIIIIIIIIIIIIIIIII
,I.»zgisz‘i‘IIIéIIIIiI MI.“IIIIIIIIIIIIIIIIiiivx’ifl“ ‘ ‘ I I ‘I”IIIIIJIIIIIIIII. .II IIIIIIIIIIIIIIIIIIIIIIIII
W III” "iIIIIIIIIIIIIIII”III . ,IIIIII III‘II IIIIIIIIIIII,
” ‘ “I’“““‘““IIIIII“IIIIIII IIIIIIIII ff‘fI‘gIII I IIIIIIIIIIIIIIIIIW ‘ ‘ W‘IIIIIII III I I IIIIIIII
‘ “III I IIIIIIIIII I... “I I IIIIMIII I. I MI‘III, II MsIz‘IzImzi‘ .
U “I’ I ‘ .“I .w I IIIIIIIIIIJ M ‘I‘IIMII‘IIIIII , IiIIIIIIIIMIIIMI,I
I “’III‘IIIIIII ‘ III II...“ I III‘ I i g I III I . IIIIIIIII
I I“I”“‘II‘IIIIIIIEI?I , I I I mum. I~.I,MI.‘I.MI “I, I M ‘ ,IWII I I I’M
j WINSmy ‘ I lie IIEIII ’gIe IIIMIII “‘n M I I i“i II?“ III LII III‘I‘ . M
I‘“I““‘IIIIIIIIIII II I I III II“ . II IIIIIIIIIIIIfinal’
I ‘. Inz’III‘III , ‘ . I I ’IIIIIII‘IIIIIIIIIIIIIII .if‘ II ‘ III WI‘III‘HI‘I ’ xIIiII..¥iIz”EiJf I
I jzIIIIIIIIIIIIIIIIIII?IIIfiIIIII I I III III“ “IIIiII’IIIIIIIII‘IilIIII“ II I I f ‘I‘I II IIIIIIIIIIII’fiIIIé‘I’““y‘
MI ‘éé‘fII‘iJII‘IL‘TII’I IIII I «In. I IIIIIIIIISIH‘IIQ I u ‘ MI HINDI“ III‘WIIIIIII III‘IIIII’IIIIIIIIII,I.II
s‘a Ii“ IIIIII‘IIIIIIEIIIIIIIiIIIIiI”r I ’I II ,...» IIIIIIjIIIIIu .‘wII I I ‘ IIII‘II III I“ IIII‘MI‘II‘MI ‘ IIEIIIIIIIi‘IziIIJIIr. I
I, IWIM I I I II I w i“III‘III‘gI“‘ ‘ I «Ij‘III‘I‘II I I
IIIII‘IIIIIIIII ’ IIIIIII II I..IIIII..IIII“IIXIM‘ n. ~ III I IIIIIIIIIIIEI
WWII” ”It JIM“ I II I I ’ WIIIIIIIIIM I M‘ I II I I IIIIIII II IIIIIIII III IIIII IIIIIIIIIIIIIIIIIIIIII
aIf"§IJ‘‘§ IIIiIIIIIIIIIII IIIIIIIIII II I II I mIm‘I’. » ‘ IIIIIIIIIIII‘Ivg.I£IW i‘UIIIMIIIII I ‘
III’IIIII ‘HIII‘IIIJIII I III IN” I‘ III m .I II I IIIIIIII
II IIIIIIIIIIII V jIIIIIIIIIIIIIIIII II III II...“ M , I I I IIIIIIIIIIIIIIIIIII
zéIIIEI‘Vz “I” I x I’III ‘, I ‘ ’ I I‘C’I III‘I I“ II ‘ I II I ‘IIIII‘IIM‘IIIIMIII III IIIIQIIIIII I I II IIIINHIIII II
IIIIII‘IINIl HII I‘ I M .IIIIIIIIIPII II I IIIIIIII“‘I‘II I‘ ‘ “ M II I II ’y‘IvIIII, I‘ II IIIIIIIIIIIIII I I
W IIIII V IIWIIIIII I I MIIILM‘ it?» . I I III
I IIIiIII‘ M IIIinIiIIIIIIIIIIIII I II WINN‘ I . I I I I III II
II ‘IIIIII x, IIIIIIIII,I III I IIIIIII‘W M M I III
“M IMIII , IIIIIII III ,M IWI I I I ‘ I ,IIII‘JIIIsII III I III
M III III. IIIIIIII. .I’I” gr, MM M I M , I IIIIIIIIIIIIIIIIIIIIIII
II‘III IIIII’IIII I I I III‘II‘I I I’MWI’IIIIIIIIII’IKII ”.MijIIs‘m I‘IIIIIIII’II IIIIIIIII I
IIIII I II II IIIWIIII’I‘III III
I II I I I I I ,M I
III IIIII‘IIIIIIII ’ II I I mar IIII IIIIIIIIIIII WW II IIIIIIIIIIIIIII II
liilIIiIiraf“ IIIII M mm IIII’IIIII m ’IIIIII.IIIIIIIIIIIII I I IIIIIII
IIIIIIIIIH m II“ III I’I‘IVIIIIIIIII u
MI IIIE‘II M H» II II IJII I I, » I
égfglizr . M‘ . I um I Ig‘f‘IIIIIIIIIIIIIII
IIKIIIIIIIIII II I I IIIIIIII‘ ”MEI IIIIIII IHIIIIIIIIIIIIIIIII v IIIII‘II“
III’ITIII’IIII‘IIV ’ I I III II III” ~ I IIi
if I IMI‘Ij’flf‘I‘IiIIIithIIEII . v III‘IIIIIIII I “II , I I II ‘zIIg’IIII‘zIQIII,
‘ IMII‘IIII , I IIIIIIIIIIIIIIII IIIIIII IIIIIIIEII IIIIIIIIIIIIII III III IIIIIIIIIIIIII
Ii I i,”III‘IIUIIQI’IIIIIIII’EI F» , . II‘III‘II .. “ IIII’rIII’Iu II who
. IifTarsiIIIIIIEIIIIIIIM ~ . I I IIIIIII I“??? IaIIIIISIIIIIII’IIIIIII I .I
I I IMIXTIIEI‘IIIH“an” ”E I Ii Ire “ I‘M hauliidInnIUII,» ‘i IIIIII L
I z ix“‘fI“““IEIE‘IIIIés§.III£IIIIII I a IIII’IIIM’W ngifIgi’»,
,M r ‘I’llI‘IS‘IIZIIIIII’II‘IIIIIII II IN? IIIIIIIIIII‘
I II II I. I?“Ii‘IIIEIEIIIVIiééII‘I§.§“Iis“ ‘z , I . a. .. IIIII,eMIEIIIIIIIIiMzIL .
’ IIII‘ISIIIIIIIIIIIIIII IIIIIIHMIIMI.)
OCR Error: Error: Data path does not exist!
at createErrorFromErrorData (C:\reactnativeapp\ocr\node_modules\react-native\Libraries\BatchedBridge\NativeModules.js:146)
at C:\reactnativeapp\ocr\node_modules\react-native\Libraries\BatchedBridge\NativeModules.js:95
at MessageQueue.__invokeCallback (C:\reactnativeapp\ocr\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:414)
at C:\reactnativeapp\ocr\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:127
at MessageQueue.__guard (C:\reactnativeapp\ocr\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:314)
at MessageQueue.invokeCallbackAndReturnFlushedQueue (C:\reactnativeapp\ocr\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:126)
at debuggerWorker.js:72
Data path is : file:///storage/emulated/0/documents/a.jpg which is absolutely correct
Inside document folder there is an image called "a.jpg" still there is error
Hey,
I managed to get react native tesseract ocr run for iOS. But: When I use your example I can't use RNTesseractOcr as it is still undefined after I imported it:
import RNTesseractOcr from 'react-native-tesseract-ocr';
Does anyone has a clue how to proceed here?
Probably the same issue here but this time it's with iOS.
Hi,
I was wondering is this possible?
What I though would it be possible edit this java class where you declare languages and trained data
https://github.com/jonathanpalma/react-native-tesseract-ocr/blob/master/android/src/main/java/com/reactlibrary/RNTesseractOcrModule.java
Add some lang of my own, and then reference it in react & use it? Would that work as expected?
This issue has been filed before here, but I wondering if anyone has faced this issue lately.
I'm using RN 0.55.4 and react-native-tesseract-ocr 4.0.0.
In file included from /Users/gmaggess/dev/oracle/amce/omce_demos/aria_ocr/node_modules/react-native-tesseract-ocr/ios/RNTesseractOcr.m:2:
/Users/gmaggess/dev/oracle/amce/omce_demos/aria_ocr/node_modules/react-native-tesseract-ocr/ios/RNTesseractOcr.h:3:9: fatal error: 'TesseractOCR/TesseractOCR.h' file not found
#import <TesseractOCR/TesseractOCR.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
** BUILD FAILED **
The following build commands failed:
CompileC /Users/gmaggess/dev/oracle/amce/omce_demos/aria_ocr/ios/build/Build/Intermediates.noindex/RNTesseractOcr.build/Debug-iphonesimulator/RNTesseractOcr.build/Objects-normal/x86_64/RNTesseractOcr.o RNTesseractOcr.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
My app is getting crashing on using this module. Tried everything. Image path was also correct. Help..
Is there any plan to support PDF Docs ?
My package.json
...
"dependencies": {
"react": "16.3.1",
"react-native": "0.55.4",
"react-native-image-picker": "^0.27.1",
"react-native-tesseract-ocr": "^1.0.10"
},
"devDependencies": {
"babel-jest": "23.6.0",
"babel-preset-react-native": "4.0.1",
"jest": "23.6.0",
"react-test-renderer": "16.3.1"
},
"jest": {
"preset": "react-native"
}
...
Using this dependency
com.android.tools.build:gradle:2.2.3
When I run
react-native run-android
I get this error
Could not expand ZIP 'D:\Progetti\Vari\ReceiptScannerTesseract2\node_modules\react-native-image-picker\android\build\outputs\aar\react-native-image-picker-release.aar
Which image-picker version shoul I use instead?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.