Jul 29, 2014 Replies: 21 This library will extract text from images via OCR. Requirements: 1- B4A 3.82. 2- Get an API Key HERE (you need to create an account). 3- Internet connection. How to install: - Copy the OCR.jar and OCR.xml to your additional libraries directory. Usage: B4X: Expand Collapse Copy Private myOCR As OCR myOCR.Initialize(Me, "myOCR", "<YOUR_API_KEY>") myOCR.ExtractFromImage(File.Combine(File.DirAssets, "sample.gif"), "", "scene", 20000) That's it. You can upload an image or reference one via a URL, the service will return the extracted text (if any). NOTES: - OCR is not perfect, so, expect some weird results or no results at all. - It is a free service but some quotas apply. For more details, see the attached project. Attachments OCR_Sample_Project.zip OCR_Sample_Project.zip 22.8 KB · Views: 1,073 OCR_Library_1.2.zip OCR_Library_1.2.zip 7.6 KB · Views: 1,146 Last edited: Aug 6, 2014 Click to expand...
This library will extract text from images via OCR. Requirements: 1- B4A 3.82. 2- Get an API Key HERE (you need to create an account). 3- Internet connection. How to install: - Copy the OCR.jar and OCR.xml to your additional libraries directory. Usage: B4X: Expand Collapse Copy Private myOCR As OCR myOCR.Initialize(Me, "myOCR", "<YOUR_API_KEY>") myOCR.ExtractFromImage(File.Combine(File.DirAssets, "sample.gif"), "", "scene", 20000) That's it. You can upload an image or reference one via a URL, the service will return the extracted text (if any). NOTES: - OCR is not perfect, so, expect some weird results or no results at all. - It is a free service but some quotas apply. For more details, see the attached project.
Douglas Farias Expert Licensed User Longtime User Jul 29, 2014 #3 works fine on brasil *-* portuguese linguage perfect *-*
Douglas Farias Expert Licensed User Longtime User Aug 5, 2014 #5 @NJDude you know the diference of scene , Photo etc? I see the coments on your lib, but working i realy dont see diference what you recomend to use?
@NJDude you know the diference of scene , Photo etc? I see the coments on your lib, but working i realy dont see diference what you recomend to use?
NJDude Expert Licensed User Longtime User Aug 5, 2014 #6 The default is "photo", but in some cases you have to use the other ones depending on what kind of picture you are submitting, you will see that in some cases the default (photo) will not return any text and by changing it to scan (or any other) it will, you will have to try.
The default is "photo", but in some cases you have to use the other ones depending on what kind of picture you are submitting, you will see that in some cases the default (photo) will not return any text and by changing it to scan (or any other) it will, you will have to try.
Douglas Farias Expert Licensed User Longtime User Aug 6, 2014 #7 i go make a chosse option when user go send and about socket time error? its possible add on the request a timeout? 60000 seconds etc ?
i go make a chosse option when user go send and about socket time error? its possible add on the request a timeout? 60000 seconds etc ?
NJDude Expert Licensed User Longtime User Aug 6, 2014 #8 The default timeout is 20 secs, but I could modify the library to accept a timeout parameter.
Douglas Farias Expert Licensed User Longtime User Aug 6, 2014 #9 thx man, the requests for portuguese is more time *-* sometimes works in 20s , english is very fast *-* i go wait thx
thx man, the requests for portuguese is more time *-* sometimes works in 20s , english is very fast *-* i go wait thx
NJDude Expert Licensed User Longtime User Aug 6, 2014 #10 I don't think that the language has anything to do but I will add the timeout parameter anyway.
JohnD Active Member Licensed User Longtime User Aug 6, 2014 #11 Very cool! I fed it a php source code file saved as a gif. It did a great job for a work in progress. Do you know if it works better with a particular Windows font and size? I'd like to play around with it some more.
Very cool! I fed it a php source code file saved as a gif. It did a great job for a work in progress. Do you know if it works better with a particular Windows font and size? I'd like to play around with it some more.
NJDude Expert Licensed User Longtime User Aug 6, 2014 #12 A new version has been uploaded to the first post, it adds a new parameter: Timeout to the ExtractFromImage method.
A new version has been uploaded to the first post, it adds a new parameter: Timeout to the ExtractFromImage method.
NJDude Expert Licensed User Longtime User Aug 6, 2014 #13 JohnD said: Very cool! I fed it a php source code file saved as a gif. It did a great job for a work in progress. Do you know if it works better with a particular Windows font and size? I'd like to play around with it some more. Click to expand... It is hard to say, OCR can be very picky, but, so far, during testing it did a decent job.
JohnD said: Very cool! I fed it a php source code file saved as a gif. It did a great job for a work in progress. Do you know if it works better with a particular Windows font and size? I'd like to play around with it some more. Click to expand... It is hard to say, OCR can be very picky, but, so far, during testing it did a decent job.
JohnD Active Member Licensed User Longtime User Aug 6, 2014 #14 If I can identify any specific preferences or dislikes the software has to fonts and sizes I'll let you know.
If I can identify any specific preferences or dislikes the software has to fonts and sizes I'll let you know.
NJDude Expert Licensed User Longtime User Aug 6, 2014 #15 One thing I can tell you is that any OCR works better if the image (text especially) is using high contrast, the extraction is better, there's no perfect OCR.
One thing I can tell you is that any OCR works better if the image (text especially) is using high contrast, the extraction is better, there's no perfect OCR.
R Robert Vermulen Member Licensed User Longtime User Aug 14, 2014 #16 Hi, I have tested in android 2.3.6 it is working fine, but in 4.0.4 its showing error " javax.net.ssl.sslpeerunverifiedexception no peer certificate ". plz help me to fix this. Thanks
Hi, I have tested in android 2.3.6 it is working fine, but in 4.0.4 its showing error " javax.net.ssl.sslpeerunverifiedexception no peer certificate ". plz help me to fix this. Thanks
NJDude Expert Licensed User Longtime User Aug 14, 2014 #17 Are you trying on a real device or the emulator?, I don't have that problem on any of my devices.
LucaMs Expert Licensed User Longtime User Aug 14, 2014 #18 I obviously appreciate (and "Like"d) this in your library and your job, NJDude. But I'm thinking about how many times we rest to external sites for our apps: and if the site in question shut? I should open a thread for this, although I do not know exactly where. I'll do it in chit-chat with a reference in the questions
I obviously appreciate (and "Like"d) this in your library and your job, NJDude. But I'm thinking about how many times we rest to external sites for our apps: and if the site in question shut? I should open a thread for this, although I do not know exactly where. I'll do it in chit-chat with a reference in the questions
Erel B4X founder Staff member Licensed User Longtime User Aug 18, 2014 #19 You need to use a more recent version of android.jar (under Tools - Configure Paths).
MarcoRome Expert Licensed User Longtime User Oct 2, 2014 #20 Hi NJDude. One question... but work only with characters latin. Because with russian , chinese characters dont work. Any idea ? Thank's
Hi NJDude. One question... but work only with characters latin. Because with russian , chinese characters dont work. Any idea ? Thank's