Coder Social home page Coder Social logo

renard314 / textfairy Goto Github PK

View Code? Open in Web Editor NEW
789.0 789.0 293.0 1.5 GB

Android OCR App

Java 2.23% Makefile 0.29% C++ 35.41% C 57.25% HTML 1.16% Shell 1.93% SAS 0.05% Smalltalk 0.01% Assembly 0.12% Module Management System 0.05% Objective-C 0.01% Roff 0.12% WebAssembly 0.05% CMake 0.43% M4 0.02% PostScript 0.01% Python 0.27% TeX 0.01% Kotlin 0.57% Dockerfile 0.01%

textfairy's People

Contributors

anilbattini avatar renard314 avatar rmtheis avatar teovogel avatar walkman100 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

textfairy's Issues

showing changes

After editing a page the changes are not lost but also not shown if you change pages, so you have to close and re-open the document.

Text Fairy 1.1.9
Android 4.1.2
SGH-I747M

../libjpeg/jidctfst.S:66: Error: missing ')

I got this error message when compiling jpeg lib with ndk-build:
Compile arm : jpeg <= jidctfst.S
/opt2/svn/textfairy/textfairy/../libjpeg/jidctfst.S: Assembler messages:
/opt2/svn/textfairy/textfairy/../libjpeg/jidctfst.S:66: Error: missing ')'
/opt2/svn/textfairy/textfairy/../libjpeg/jidctfst.S:66: Error: garbage following instruction -- PLD (r2,#0)' /opt2/svn/textfairy/textfairy/../libjpeg/jidctfst.S:259: Error: missing ')' /opt2/svn/textfairy/textfairy/../libjpeg/jidctfst.S:259: Error: garbage following instruction --PLD (sp,#32)'
/opt2/svn/textfairy/textfairy/../libjpeg/jidctfst.S:271: Error: missing ')'
/opt2/svn/textfairy/textfairy/../libjpeg/jidctfst.S:271: Error: garbage following instruction -- `PLD (ip,#32)'
make: *** [obj/local/armeabi-v7a/objs/jpeg/jidctfst.o] Error 1

I tried sugestions described on stackoverflow[1], and replacing () with [] worked for me.

I have openSUSE 12.3,
[1] http://stackoverflow.com/questions/14366630/getting-this-error-while-building-android-ndk

Add dialog after ocr

Dialog should show

  • ocr confidence (happy or unhappy fairy image)
  • in case of bad confidence option to open help dialog for tips
  • option to copy text to clipboard
  • option to export as pdf
  • option for text to speech

TTs crash

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.speech.tts.engine.CHECK_TTS_DATA }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1575)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1423)
at android.app.Activity.startActivityForResult(Activity.java:3587)
at android.app.Activity.startActivityForResult(Activity.java:3548)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:839)
at com.renard.documentview.TtsActionCallback.onCreateActionMode(TtsActionCallback.java:98)

Export Wizard

Allow user to configure Export options:

  1. pdf yes/no
  2. raw text yes/no
  3. include image in pdf yes/no

Manual rotation of image

in the crop image screen the user must be able to rotate the image also by using the rotate gesture.
This feature must be made discoverable by an overlay or pop up dialog.

remove hypens that mark linebreaks

Since the text flows differently on small phone screens than on printed paper the app should detect words that are separated by hyphens and remove the hyphen.

Implement navigation drawer

navigating the app should be easier. I want to remove the start screen activity and replace it with the navigation drawer pattern.
The navigation list shall include

  • whats new
  • tips
  • about
  • get involved

reduce apk size

remove language data from apk. let user download it manually after installation or use extension file.

improve paragraph detection

since upgrading to latest version of tesseract the quality of the paragraph detection has decreased. find out why

improve text/image separation

1. do tiled color cluster analysis to find regions that have
  * only 2 different clusters of colors
  * one cluster is then the text color (it should be the smaller cluster, probably very dark, or very light)
  * the other cluster is  the background color on which the text is printed
  * it is possible to have more than one text background color for the whole document
      * build a list of background colors
2.  now  some assumptions can be made
  * tiles which have only one cluster of color which is in the list of  text background colors can be thresholded away since they are probably only naked paper
  * all tiles that have more than two clusters of color must be preserved as image regions
3.  what is left are regions that qualify as text regions but in reality might also be  lines, drawings, dirt specks etc. 
      * lines could be filtered out by connected component analysis or other means. 
      * Dirt specs and other noise might also be filtered away after ocr

Problems:
what is the text color for step 1?

loading image...

After adding a page to a document it shows "loading image" forever and never shows the new page, you have to press back 2 times and re-open the document.

Text Fairy 1.1.9
Android 4.1.2
SGH-I747M

requested features to reduse button presses.

-Per document settings:
-_auto rotate (90, 180, -90)
-_auto select scan type (single, multiple, no-ocr)
-optionally open to last page by default.
-option to remove a failed scan/page from a document
-option to auto process (with less aggressive or no cropping) a directory of images

Chrash when loading images other than jpgs

java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.lang.RuntimeException: Failed to read pix from memory
at com.googlecode.leptonica.android.ReadFile.readMem(ReadFile.java:52)
at com.renard.ocr.BaseDocumentActivitiy$1.doInBackground(BaseDocumentActivitiy.java:318)
at com.renard.ocr.BaseDocumentActivitiy$1.doInBackground(BaseDocumentActivitiy.java:255)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
... 4 more

Icon missing on help dialog

In document_help.html. It looks like the "android_res" path doesn't work on some versions of Android.

file:///android_res/drawable/ic_action_camera.png

device-2014-01-01-183913

Fix installation procedure

Can you please fix "building-from-command-line" to current git code? I found out that procedure described is not complete[1]:

  1. After 'git clone' I need to run:
    cd textfairy
    git submodule init
    git submodule update
  2. After "get a coffee" there should be "cd .."
  3. There is no directory 'NineOldAndroids'. So the command the relevant code should not mentioned there + it have to be removed from project.properties[2].
  4. Maybe it would be good to mention that user should use target installed on computer instead of "17", otherwise they will get error: "Error: Target id '17' is not valid. Use 'android list targets' to get the target ids." when they run "android update lib-project -t 17 -p ActionBarSherlock/actionbarsherlock"
  5. I need to run "android update project -t android-14 --path ." instead of "android update project --path ."
  6. There is no ant-debug (on opensuse 12.3. 64 bit ;-). I need to run:
    ant
    ant release

Unfortunatelly "ant release" finished with error:
[aapt] Generating resource IDs...
[aapt] aapt: warning: string 'option_extra' has no default translation in /opt2/svn/textfairy/ActionBarSherlock/actionbarsherlock/res; /opt2/svn/textfairy/textfairy/res/layout-v11/document_pager_fragment.xml:7: error: No resource identifier found for attribute 'sfound: de
[aapt] aapt: warning: string 'problem' has no default translation in /opt2/svn/textfairy/ActionBarSherlock/actionbarsherlock/res; found: de
[aapt] wipe_rotation' in package 'com.renard.ocr'
[aapt] /opt2/svn/textfairy/textfairy/res/layout-v11/document_pager_fragment.xml:7: error: No resource identifier found for attribute 'overscroll_rotation' in package 'com.renard.ocr'
[aapt] /opt2/svn/textfairy/textfairy/res/layout-v11/document_pager_fragment.xml:7: error: No resource identifier found for attribute 'overscroll_translation' in package 'com.renard.ocr'
[aapt] /opt2/svn/textfairy/textfairy/res/layout-v11/document_pager_fragment.xml:7: error: No resource identifier found for attribute 'animate_alpha' in package 'com.renard.ocr'

BUILD FAILED
/opt2/android-sdk-linux/tools/ant/build.xml:650: The following error occurred while executing this line:
/opt2/android-sdk-linux/tools/ant/build.xml:691: null returned: 1

[1] https://github.com/renard314/textfairy#building-from-command-line
[2] https://github.com/renard314/textfairy/blob/master/textfairy/project.properties

Improve crop image view for tablets

  1. The image displayed for choosing the part of the image to extract text from was about the size of a postage stamp on my ten-inch tablet screen. It should be scaled to fit the screen, perhaps limited to 100%.

Batch Mode

Allow user to make multiple fotos one after the other. The OCR process should then be done in a background service.

Language download not working after changing tess data directory

Allerdings gibt es ein Problem beim verändern des Tessdata Verzeichnises. Ich habe ein Samsung GT-S7710 (Xcover 2) mit Android 4.1.2. Seltsamerweise nennt Samsung in diesem Gerät den internen Speicher sdcard0 und die SD-Karte extSdCard. Das führt dazu das viele Apps ihre Daten im internen Speicher ablegen und dieser sehr schnell voll ist. Also habe ich den gesamten Textfee Ordner nach extSdCard verschoben und in der App den Pfad extSdCard/Textfee/Tessdata angegeben. Die App funktioniert jetzt auch mit allen bereits heruntergeladenen Sprachen allerdings bricht der Download weiterer Sprachen immer ab. Beim antippen der Sprachdatei erscheint der wandernde Ladebalken sowie das Downloadsymbold in der Statusleiste. Dann verschwindet das Downloadsymbol und die Wlan Aktivität stoppt. Als Workaround bin ich gerade dabei die Sprachpakete nach und nach auf die Sd-Karte zu kopieren.

OCR Intent

Let other apps call the text fairy via the Android intent system

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.