-
-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use OCR #29
Comments
Hey @darkdoctor I'm sorry for taking so long to answer but I've been pretty busy with some work stuffs.
This module only supports the languages previously defined on the Usage section. (But yes, I should have a look at the exception that is being throwed)
I have identified this is caused because when we process an image that was taken from our cellphone camera, the picture tends to has a big file size and because of this the ocr processor usually gets stuck. In order to fix that we should work on a solution to check the file size before use inSampleSize considering that when it is used (usually to save memory) the ocr quality decreases. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
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.)
The text was updated successfully, but these errors were encountered: