Android OCRSample using tesseract in Android - android

I want to make an application in that text is extracted and converted into another language like below app at time of camera is viewing like below screen shot of below app in play store CamDictionary
Below is the screen shot
Look in this camera is scanning and translating is done at real time can anybody suggest me example like this
I googled and find out one library
https://github.com/komamitsu/Android-OCRSample
but in that it suggested that
checkout http://code.google.com/p/tesseract-ocr/ and copy traineddata file(s) into "/mnt/sdcard/ocrsample/tessdata/" on your Android like this:
adb push ~/src/tesseract-ocr-read-only/tessdata/eng.traineddata /mnt/sdcard/ocrsample/tessdata/
I have searched out whole thing but there is no any file that should i have to put in /mnt/sdcard/ocrsample/tessdata/ can any body suggest me what is that file because i have checkout following link
svn checkout http://tesseract-ocr.googlecode.com/svn/trunk/ tesseract-ocr-read-only
but it contain so many source code for windows app also and there is like more than 700 MB
i want just andorid files that should i have to put in SDCARD please any body help me
is there any other solution than also please suggest me

Related

Read PDF file in specific order

I need to convert this PDF into a spreadsheet that looks something like THIS. But when I copy and paste all the text from the PDF (CTRL+A), the layers are in some weird unpredictable order and looks like THIS.
Is there anyway to copy and paste the text in some kind of predictable way so I can turn it into the spreadsheet I linked to? (I should mention that I'm making an android app, so id prefer the solution to be inside an Android Studio Project, but that might not be necessary)
Any suggestions are appreciated, thanks.

Android API guides (with figures) for offline use

I'm looking for a possibility to browse the android API guides offline (with figures). I read several questions about this here (ex. 1, 2, 3...) and tried to get offline docs from the sdk folder or using a direct link. The problem with the actual version (23_r01) is that the images are often not displayed. For example in the page sdk/docs/design/index.html the image hero-material-design.png could not be displayed because of a bad src tag.
What I've tried:
Using the docs from the SDK folder
Direct download from https://dl-ssl.google.com/android/repository/docs-23_r01.zip
Saving the files using HTTrack (I'm getting errors here..)
What I would like to achive:
Download a correct version of the docs
OR "Repair" all the broken image paths in the html files
I would appreciate any help.
If thats still interested to you, just edit \docs\design\index.html, add .. before /design (it means the parent folder, one dot means the current), like that:
<img class="dac-hero-image" src="../design/media/hero-material-design.png">

Tesseract character recognition problems in Android (but not on iOS?)

I've build an application that uses Tesseract (V3.03 rc1) to identify some specific text strings. These are, unfortunately, printed on a custom font that requires that I build my own traineddata file. I've built the application on both iOS (using https://github.com/gali8/Tesseract-OCR-iOS for inspiration) and Android (using https://github.com/rmtheis/tess-two/ for inspiration as well).
The workflow for both platforms is as follows:
I select a bounding box on the preview screen for where I can crop out the relevant text, and crop the image accordingly.
I use OpenCV to get a binary image (using OpenCV's adaptive threshold function with the same parameters for both platforms)
I pass this binary image to Tesseract. Both platforms (Android and iOS) use the same traineddata file.
And yet, iOS recognizes the text strings perfectly, while Android keeps misidentifying certain characters (6s for Ss, As for Hs).
On both platforms, I use the same white list string, I disable load_type_dawg and load_system_dawg, and also choose to save the blob choices.
Has anyone encountered this kind of situation before? Am I missing a setting on Android that's automatically handled in iOS? Is there something particular about Android that hasn't crossed my mind?
Any thoughts or advice would be greatly appreciated!
So, after a lot of work, I found out what was wrong with my Android application (thankfully, it wasn't an issue with Tesseract at all). As I'm more familiar with iOS apps than Android, I wasn't sure how I could load the traineddata file onto the application without requiring the user to have the file loaded on their external storage device. I found inspiration in this project (http://www.codeproject.com/Tips/840623/Android-Character-Recognition), as they autoload the trained data file.
However, I misunderstood how it worked. I originally thought that the TessDataManager did a file lookup on the project's local tesseract/tessdata folder in order to get the trained data file (as I do this also on iOS). However, that's not what it does. It, rather, checks the internal file structure (data/data/projectname/files/tesseract/tessdata/traineddatafilegoeshere) to see if the file exists and if it doesn't, it copies over the trained data file it keeps in the Resources/Raw directory. In my case, it defaulted to the eng file, so it never read my custom font file.
Hopefully this helps someone else having similar issues. Thanks to Robin and RmTheis for all of your help!

Using the GPUImageFilter library in android

i m new to android and after having long search and also tried some java code for implement filter effect like the instagram so going with java code filter effect are working but too slow,so week before stop using that effect and after search found one library GPUImageFilter(on github) and start working on that library .The library for filter effect work very fine and produce some good effect also and i m able to implement in my project also but the next thing arise as after saving the image with filter in the sdcard ,if again i try to fetch that file from the sdcard it showing nothing but blank screen and if we look inside the device sdcard it showing as file is saved and opening in the gallery also.can any tell me how to overcome this problem.Here is the link where u can find the lib:
link:-GPUImageFilter library
any help will be very much helpfull to me.Thanks and waiting for reply.

Graphic for Android/iPhone

I'm making a illustrated instruction for how to use an app that will be needed
for Android/iPhone
I'm not much into coding for Android and I though the client just needed the
illustration but he asks:
"We will need the illustration saved to a file that we can run on mobile devices (iPhone/Android) as well as the source code."
Isn't jpg enough? is there some additional code that you android programmers are
aware of?
No. In Android you can just use a Drawable. This can be a number of different file formats, including your jpeg. It may be good to have a look at Android Asset Studio. With this tool you can get a nice zip file for all your different screen densities. If you keep the file structure that asset studio outputs then Android will do all the heavy lifting for you.
It might also help you to know something about 9-patches. This is how Android knows how to resize and stretch your image. Asset Studio has an option to set this as well.

Categories

Resources