Is there a way to teach tesseract for iOS a new font? - ios

Im currently using tesseract for iOS using Nolan Brown's example. It works ok, but I need it to start picking up a new font (which I have in .tff format) which will always be numbers.
I have found questions on StackOverflow about tesseract learning fonts which all point to the google guides on how to teach Tesseract a new font using command line. But I'm already using a compiled copy of the lib from Nolan's example.
How can I teach tesseract a new font? Will I need to recompile the lib for iOS? How do I do this?

You might try training a new "traineddata" file using these instructions.

Related

How can all the icon images for Corona SDK apps be generated from a single image file?

To properly customize the app icons for various platforms when using the Corona SDK game engine, a fairly large set of image files of specific sizes needs to be included in the project's root directory and specified in the build.settings file (detailed requirements are found in the Building/Distribution Dev Guide.
Is there any way to easily generate all the required image files for iOS and Android builds starting with a single, hi-res image file?
I use generator Icon Generator for Corona SDK with my previous game.
Solutions using various image processing apps can be found on the Corona Community Forum. My own solution was to write a Script-Fu script in Scheme for GIMP.
For those who are interested, the script (make-corona-icons.scm) and its README (with bare bones installation instructions) can be found in this public GitHub repository. GIMP, the open-source cross-platform "GNU Image Manipulation Program", is free and excellent and can be downloaded here.
I use makeappicon.com. It has treated me well for many years.

Tesseract integration to my Project on xCode 6.3 iOS 8.3

I'm really digging the web and stackoverflow questions but none of them does not solve my problem.
I'm trying use Tesseract OCR in my iOS Project, but integration did not go what I expected. I follow the instructions in this blog and I did the all things but still I m not able to integrate it. May be because of the new updates, anyway I just want to solve my problem.
So I have added all files to my project about tesseract and leptonica and I have added tessdata to my project.
I also tried the run existing project on github but still the problem exists.
Error is
I checked eng.cube.lm file exists in project and I also linked it.
Please help!
I could not found my answer, but I found another way to do it. I used cocoapods to get OCR library . This is the simplest way to adding dependency to your project.
This very clear how to use cocoapods quick guide,
This is the pod that I used tesseract OCR pod
This is the installation guide to tesseract OCR
If you follow the tips, everything will be good.
On the other hand, I think my problem was file broken or out of date to new versions. My first way was very dirty and rough. To use tesseract on iOS , best way is the Cocoapods
I hope this will help someone!

Training Tesseract ocr using jTessBoxEdit

Hi i want to generate tesseract OCR training data file(tessdata). I'm using jTessBoxEditor tool(On Mac Os) for achieving this, but i have no idea how can i use this tool.And further i use the tessdata file in my ios application.
I'm also searching for this i share the links with you
http://vietocr.sourceforge.net/training.html
http://code.google.com/p/tesseract-ocr/wiki/TrainingTesseract3
but i have no luck :( . So please share the links which provide detail/steep by by steep implementation of training file(teasdata file).
Here is the download for the tess files
http://code.google.com/p/tesseract-ocr/downloads/detail?name=tesseract-ocr-setup-3.02.02.exe&can=2&q=
I'm on the same page as you with getting this to work. Here is the tut im using.
http://www.resolveradiologic.com/blog/2013/01/15/training-tesseract/
I have learned that you need a .tif file with a .box file in the same folder to load the boxes.
For Example
testdata.tif
testdata.box
anotherExample.eng.tif
anotherExmaple.eng.box
To create box files easily if you don't know how do this after you download and install the tesseract files.
->Open command prompt and CD to your tesseract file, which is usually in your programfiles/Tesseract-ocr folder
-> Run Box creator tesseract C:\location of the tif file\thetiffile.tif C:\location of the tif file\thetiffile.tif
batch.nochop makebox
and that should spit out the box file you need.
I'm in the process of going through and discovering. I will keep you updated. If you have any other issues let me know and maybe I can help.
You'll have to build or install all the Tesseract training executables first. Then inside jTessBoxEditor, set the appropriate Tesseract Executable location.

OCR Tesseract set up only numbers

I am new to programming in general and have recently gotten into App development. I am using tesseract for iOS and I can't seem to figure out how to get it only read numbers.
There is an exact question posted by Alex G Here and I have the same files/problem as him. the answer apparently is
Go to the tessdata\configs\digits file. If you're using the API, then
call SetVariable("tessedit_char_whitelist", "0123456789-."); You use
the SetVariable API if you want to programmatically call Tesseract,
via Objective-C, for instance.
Except I still do not understand how to do this. Where is this command line? I am calling Tesseract from Xcode and not a command line. I also do not contain this tessdata\configs\digits file.
If somebody could please help me I would really appreciate it.
Thanks!
Ted
If you follow the How To: Compile and Use Tesseract (3.01) on iOS (SDK 5) article, you would place the SetVariable statement after the Init call, as follows:
tesseract->Init([dataPath cStringUsingEncoding:NSUTF8StringEncoding], "eng");
tesseract->SetVariable("tessedit_char_whitelist", "0123456789-.");

Getting text from image on ios (image processing)

I am thinking of making an application that requires extracting TEXT from an image. I haven't done any thing similar and I don't want to implement the whole stuff on my own. Is there any known library or open source code (supported for ios, objective-C) which can help me in extracting the text from the image. A basic source code will also do (I will try to modify it as per my need).
Kindly let me know if some one has any idea on this.
Thanks,
Vikram
One of the main open source libraries used to do OCR on iOS is a google-sponsored open source project called tesseract.
Here is some info on compiling tesseract for use in iOS apps:
tesseract
The same guy has a nice sample project on github demonstrating how a simple client might use the compiled library:
Pocket-OCR

Resources