Coder Social home page Coder Social logo

gali8 / tesseract-ocr-ios Goto Github PK

View Code? Open in Web Editor NEW
4.2K 192.0 947.0 846.51 MB

Tesseract OCR iOS is a Framework for iOS7+, compiled also for armv7s and arm64.

Home Page: http://www.nexor.it

License: MIT License

Ruby 0.31% Objective-C 13.73% C 48.68% C++ 34.25% Python 0.24% Objective-C++ 2.37% Makefile 0.42% Shell 0.01%

tesseract-ocr-ios's Introduction

Tesseract OCR iOS

Build Status Coverage Status

Use Tesseract OCR in iOS 9.0+ projects written in either Objective-C or Swift. Easy and fast.

These are the current versions of the upstream bundled libraries within the framework that this repository provides:

All libs are with bitcode integrated

Install

Carthage

Add the following line to your Cartfile:

github "gali8/Tesseract-OCR-iOS"

Run carthage update

Please note this is a fork, hopefully the url will change later ๐Ÿ˜ธ

Known Limitations

Release Notes

3.1.1 and greater

See the Releases page

Older releases

See the Release Notes wiki page

License

Tesseract OCR iOS and TesseractOCR.framework are distributed under the MIT license (see LICENSE.md).

Tesseract, maintained by Google (http://code.google.com/p/tesseract-ocr/), is distributed under the Apache 2.0 license (see http://www.apache.org/licenses/LICENSE-2.0).

Buy me a beer

If you like my work, please buy me a beer (tap the beer):

Contributors

Daniele Galiotto (founder) - Co-Founder at Nexor Technology srl - www.nexor.it

Kevin Conley - www.kevintechnology.com

Eduardo Irias - estamp.co

Hamilton Che hapman -

tesseract-ocr-ios's People

Contributors

bamx23 avatar cldrn avatar dlinsin avatar drmoriarty avatar eduardo22i avatar frank4565 avatar gali8 avatar jacielmelnik avatar jmah avatar ko avatar mgratzer avatar mweibel avatar neoneye avatar soum-c avatar stunner avatar sxg avatar vivekseth avatar vorlovsky avatar wannabehero avatar ws233 avatar wyattmufson avatar zachberger 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  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

tesseract-ocr-ios's Issues

Memory leak when calling setImage

There seems to be a memory leak of about 1.5MB every time setImage is called. Within the demo project if you hit recognise sample image then each time the memory will grow by about 1.5MB. This may not be a problem except that I am using the lib within an AVCaptureVideoDataOutputSampleBufferDelegate and so create a tesseract object and call setImage on it many times.

Removing .framework from the repo

I would suggest removing .framework from the repository allowing user to make it himeself.
Framework takes 21Mb. So every time someone rebuild Aggregate target an push changes to the repo, the repo increases 21Mb. Soon it will become too heavy to download it.
So far I didn't face any compiler or linker error, while making aggregate target, so there are no difficulties or issues compilint it.
Anyone?

Bazaar

Is there a way to activate the bazaar options?

Link Errors with Development version on Simulator

Hello

I was able to easily integrate Tesseract into a project using:

pod 'TesseractOCRiOS', '~> 2.2'

However, when I changed the Podfile to:

pod 'TesseractOCRiOS', :git => 'https://github.com/gali8/Tesseract-OCR-iOS.git'

then pod updated, and cleaned & rebuilt my project, many c++ symbols were not found:

Undefined symbols for architecture x86_64:
  "tesseract::TessBaseAPI::GetBoxText(int)", referenced from:
      -[Tesseract characterBoxes] in TesseractOCR

This was building for an iPhone 6 simulator (in Xcode 6.1, on OS 10.10)
When I built for an iPhone 5 OS 7.x, the build succeeded.

Is it expected that the development branch does not work for the simulator?

Thank you

App take 40M memory when recognize the image using Tesseract

My app has a feature that taking a picture and then recognize the character in the image. Before the first time to recognize the image with Tesseract object, My memory usage is about 12M. After the first recognizing, the memory usage will increase to about 38M. But i use the Tesseract as a local variable, so when i finished the task, the ARC should free all resource used by Tesseract, why the memory usage will be increase to 38M? Do the Tesseract engine will load some resources as static?

Can't cancel or stop and update UI

I can't cancel ocr process and can't update progress value on UI.

_monitor = new ETEXT_DESC();
_monitor->cancel = (CANCEL_FUNC)[self methodForSelector : @selector(
tesseractCancelCallbackFunction:)];
_monitor->cancel_this = (__bridge void *)self;

  • (BOOL)shouldCancelImageRecognitionForTesseract:(Tesseract*)tesseract {

    HUD.progress = tesseract.progress / 100;
    NSLog(@"progress: %d", tesseract.progress);
    

    return NO; // return YES, if you need to interrupt tesseract before it finishes
    }

NSLog run but not update HUD.progress...

And back button of navigation controller not work...

Access _tesseract instance variable

Is there a way (by subclassing or by other means) to access the _tesseract instance variable? This would be interesting if we would like to further customize the Tesseract class. Or is there a better way to do this?

Set Timeout

Is there a way to set timeout for recognizing?
I.e. if recognizing process's time is up then return empty string or nil.

Thanks.

Linker error when using Cocoapods

Hi,

trying to add TesseractOCRiOS via Cocoapods to my Xcode 5 Project.
But i get this linker error:

duplicate symbol _OBJC_CLASS_$_Tesseract in:
    /Users/christian/Dropbox/Programmierung/Xcode/iPad/iOpenALPR/Pods/TesseractOCRiOS/Products/TesseractOCR.framework/TesseractOCR
    /Users/christian/Library/Developer/Xcode/DerivedData/iOpenALPR-cmhrdrcimmulcybwboznvzjhhdfp/Build/Products/Debug-iphonesimulator/libPods-iOpenALPR.a(Tesseract.o)
duplicate symbol _OBJC_METACLASS_$_Tesseract in:
    /Users/christian/Dropbox/Programmierung/Xcode/iPad/iOpenALPR/Pods/TesseractOCRiOS/Products/TesseractOCR.framework/TesseractOCR
    /Users/christian/Library/Developer/Xcode/DerivedData/iOpenALPR-cmhrdrcimmulcybwboznvzjhhdfp/Build/Products/Debug-iphonesimulator/libPods-iOpenALPR.a(Tesseract.o)
ld: 2 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is it a general issue at the moment or is it my stupidness?

Update CocoaPod to 3.4.0

It seems that if we want Cocoa Pods to respect our versioning from now on, we need to make a new release versioned 3.4.0 because I believe CocoaPods is seeing version 3.03 as version 3.3 (it's truncating the 0), so it thinks that our older release 3.03 is actually newer than our latest 3.1.1 release.

Therefore, in order to "get past it" we need to release version 3.4.0. I can take care of this in the next day or so. I mainly just need to:

  • Update the podspec
  • Update the README
  • Tag the release
  • Ask @gali8 to push the release to the CocoaPods spec repo

how to init tesseract to use tessdata from document path?

Thanks for your pod, it's saved me a lot of time to compile the library.
Just one small issue: I'm writing an application that let user decide which language they want to perform OCR on, and then they could download the corresponding .traineddata file. It works well in iOS emulator but on real device, I cannot add files to MainBundle root path (seems like it's a security problem), so I have to store the .traineddata files in document folder, and I couldn't initialize tesseract from this data path (as the method has been dedeprecated).
Is there anything I can do? Thanks in advance.

Xcode5 support [SOLVED]

Hello, the previous framework worked great, but when I tried using the new framework (from the project folder), some of the headers were not included.

After recompiling the Aggregate, I still have problems getting it to run in xcode5.

Love the framework, but would really like to use the new version with the clear function.
Thanks.

Tesseract can't open trained data

I've created new project with CocoaPods and Tesseract and load the tesseract

Error opening data file /var/mobile/Applications/8900B20E-746E-445B-A328-575C94E50CA6/check.app/tessdata/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory.
Failed loading language 'eng'
Tesseract couldn't load any languages!

Here's the code:

class ViewController: UIViewController, TesseractDelegate {

    var tesseract : Tesseract?

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        tesseract = Tesseract(language: "eng")
        tesseract!.delegate = self
    }

Of couse, I indeed have tessdata folder inside my project folder, and there's eng.traineddata file there as well,

getConfidenceBySymbol crashes for some images

Using getConfidenceBySymbol to print out the confidence values for each character recognized works for the image_sample.jpg file included in the Template Framework Project, but try swapping it with the following image and it crashes every time:

failing_sample
(I know this isn't an ideal image for Tesseract, but it still shouldn't cause it to crash)

I really need to be able to use the symbol confidence values, so I really appreciate any ideas this repo's maintainers have about how to fix this issue.

Here's the code I am using to print out the confidence values:

// needed for confidence by symbol to work correctly
// see http://stackoverflow.com/questions/17393555/character-confidence-for-tesseract-3-02-using-config-file
[tesseract setVariableValue:@"T" forKey:@"save_blob_choices"];

... // setting image, calling recognize, etc.

NSArray *confidences = [tesseract getConfidenceBySymbol];
for (NSDictionary *confidence in confidences) {
    NSLog(@"%@: %@", confidence[@"text"], confidence[@"confidence"]);
}

Here's the commit I added to my fork on top of HEAD to produce this crash, if you guys want to check it out for yourselves: https://github.com/kevincon/Tesseract-OCR-iOS/commit/4bcf1ac4d2c49872381aadb867e2ce6878edd8d6

Also, +@ko since he added getConfidenceBySymbol in a pull request and might have some ideas about why it crashes for some images.

Support for arm64

The library seems great, but I would much appreciate support for iphone5s architecture (arm64) as well. Is it possible for you to build a version that supports that architecture?

Symbolic Links

You're framework is about 77MB. If you use symbolic links, you can get that down to 25 MB.

MyFramework.framework //(directory)
info.plist
MyFramework //(symbolic link to Versions/Current/MyFramework)
Resources //(symbolic link to Versions/Current/Resources)
Headers //(symbolic link to Versions/Current/Headers)
Versions //(directory)
Current //(symbolic link to directory "A" below)
A //(directory)
Headers //(directory containing framework headers)
Resources //(directory holding framework resources)
MyFramework //(actual compiled library, really a .a file)

See http://stackoverflow.com/questions/15101778/ios-custom-framework-framework-file

How to get paragraph wise text?

Hi, Tesseract API is wonderful and working great.But how it returns paragraph wise text.Suppose take below image as example here I need to get paragraph wise text, I mean I am getting all the messages as single string, so I am unable to differentiate the paragraphs in that string in this scenario. How can I do this?Here doesnt it consider two lines text as single paragraph? Two lines in a same box returning two strings.
Waiting for your reply.Thanks in advance.

hi

App Crashes after select a photo

Hi,

I downloaded the latest version, and simply run the sample project, but the app crashes after take and use a photo, even the standard behavior to read it from the sample image returns "bad access" on the method recognizeImageWithTesseract right on "[tesseract recognize];"

Even on the simulator it gives this bad access when trying to read the jpg sample. No problem to compile, folders reference. Simply a load and run, no changes, nothing and yet it does not work :-(

I use the latest iOS sdk, xCode and Mavericks running on iphone 5 on iOS 7

Any help?

Thanks in advance :-)

Please add x86_64 architecture

According to Apple's updated policies 64-bit architecture is mandatory. Setting the project to build for "Standard Architectures" will enable building for amv7, armv7s and arm64, but it will also enable x86 and x86_64 for iPhone Simulator.

Which is the best way to free up memory when recognizing an bunch of small images?

Hello,

I'm trying to match one model by giving around 20 images that I store internally before.
If one image is valid for me (if condition == true) I use to use the values to see the boxes of the characters and recognise text depending of the last character recognised. Then I make tesseract = nil; But then I have to use it again, and loading the language again takes more than if I only clean.

But clean is deprecated.

How would you recommend me to deal this?
Thank you.

_tesseract->GetUTF8Text() returns NULL

I have just cloned the latest repository.

I can successfully compile the "Tesseract OCR iOS.xcodeproj" project.

When I run the app I get this error:

2013-11-27 09:10:23.017 Template Framework Project[771:60b] DATAPATH /var/mobile/Applications/D23DF049-A133-4B12-B0EE-096076CCE77A/Documents/tessdata
2013-11-27 09:10:23.032 Template Framework Project[771:60b] trovato a /var/mobile/Applications/D23DF049-A133-4B12-B0EE-096076CCE77A/Template Framework Project.app/eng.traineddata
2013-11-27 09:10:23.037 Template Framework Project[771:60b] lo copio in /var/mobile/Applications/D23DF049-A133-4B12-B0EE-096076CCE77A/Documents/tessdata/eng.traineddata
Please call SetImage before attempting recognition.Please call SetImage before attempting recognition.2013-11-27 09:10:25.610 Template Framework Project[771:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[NSString stringWithUTF8String:]: NULL cString'
*** First throw call stack:
(0x2e663f4b 0x389f36af 0x2e663e8d 0x2ef7b4ef 0x13fbb 0x12f97 0x30ddb37b 0x30ddb139 0x30de1e05 0x30ddf4db 0x30e4a08d 0x30e46e59 0x30e41353 0x30ddc41f 0x30ddb721 0x30e40b3d 0x3327770d 0x332772f7 0x2e62e9df 0x2e62e97b 0x2e62d14f 0x2e597c27 0x2e597a0b 0x30e3fdd9 0x30e3b049 0x12bfd 0x38efbab7)
libc++abi.dylib: terminating with uncaught exception of type NSException

Xcode 5.0.2 (5A3005)
Mac OS X 10.8.5
This error happens both when I run the app on the simulator and on a device.
I have not modified the project.

Cannot Run in Simulator

clang throws a linking error when I try to build an app using this project with the i386 architecture in order to run in a Simulator. Is it because this Tesseract library was only compiled for ARM? If so please let me know so I won't spend further time trying to debug it.

CocoaPod and Framework product in repo are outdated

The README says to use this line in a Podfile:
pod 'TesseractOCRiOS', '~> 2.3'

But the CocoaPods master repo does not have version 2.3 (latest is 2.22): http://cocoapods.org/?q=tesseract

I got around this by using this line in my Podfile:
pod 'TesseractOCRiOS', :git => 'https://github.com/gali8/Tesseract-OCR-iOS.git'

But the current Products/TesseractOCR.framework file in the repo is an older version that does not include the getConfidenceByX properties on the Tesseract class, so I am unable to use those.

Can someone please update the framework file stored in the repo to reflect the changes in version 2.3? Additionally, can someone submit version 2.3 to CocoaPods?

Thanks!

[Proposal] Move the documentation to the wiki

I'd like to propose moving documentation from the README.md to the wiki. The wiki allows information to be organized into discrete pages instead of one huge file, and allows documentation to be community supported. @gali8, if you don't mind this change I'd be willing to put in the work to migrate to the wiki.

Examples!

Are there any examples one can use to test recognizing text on an image on the iOS simulator?

Issue when using UIImagePickerControllerOriginalImage (large images

It seems the lib is having issues with large images. If I use the original size pict (2448x3244) the lib just returns garbage. Resizing the image to something more human (like <1024) seems to return good results. Maybe this is by design but I could not find any explications anywhere so I'm just reporting the issue in case someone else wonders why getting the UIImage using UIImagePickerControllerOriginalImage return garbage..) thanks!

can't build project after adding framework

I've added the framework to a new x code 6.1 project targeting iPhone with objective C and tried to build it for iphone5 simulator but - but I still get build issues I can't seem to solve or avoid. Log below. Ultimately I'd like to use it in an iPad app with swift but from another issue I thought the above configuration would be the easiest way to get started initially. How can I solve these issues?

Thanks
Josh

Ld /Users/Josh/Library/Developer/Xcode/DerivedData/ClubMembership-fqjdchajssebyhdwivvuwtxvclnu/Build/Products/Debug-iphonesimulator/ClubMembership.app/ClubMembership normal i386
cd /Users/Josh/Documents/ClubMembership
export IPHONEOS_DEPLOYMENT_TARGET=8.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -L/Users/Josh/Library/Developer/Xcode/DerivedData/ClubMembership-fqjdchajssebyhdwivvuwtxvclnu/Build/Products/Debug-iphonesimulator -F/Users/Josh/Library/Developer/Xcode/DerivedData/ClubMembership-fqjdchajssebyhdwivvuwtxvclnu/Build/Products/Debug-iphonesimulator -F/Users/Josh/Documents/ClubMembership -filelist /Users/Josh/Library/Developer/Xcode/DerivedData/ClubMembership-fqjdchajssebyhdwivvuwtxvclnu/Build/Intermediates/ClubMembership.build/Debug-iphonesimulator/ClubMembership.build/Objects-normal/i386/ClubMembership.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=8.1 -framework TesseractOCR -Xlinker -dependency_info -Xlinker /Users/Josh/Library/Developer/Xcode/DerivedData/ClubMembership-fqjdchajssebyhdwivvuwtxvclnu/Build/Intermediates/ClubMembership.build/Debug-iphonesimulator/ClubMembership.build/Objects-normal/i386/ClubMembership_dependency_info.dat -o /Users/Josh/Library/Developer/Xcode/DerivedData/ClubMembership-fqjdchajssebyhdwivvuwtxvclnu/Build/Products/Debug-iphonesimulator/ClubMembership.app/ClubMembership

Undefined symbols for architecture i386:
"std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::find(char, unsigned long) const", referenced from:
tesseract::TessLangModel::IsLeadingPunc(int) in TesseractOCR
tesseract::TessLangModel::IsTrailingPunc(int) in TesseractOCR
tesseract::TessLangModel::IsDigit(int) in TesseractOCR
tesseract::WordSizeModel::Init(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::1::allocator > const&) in TesseractOCR
"std::1::basic_string<char, std::1::char_traits, std::1::allocator >::compare(char const) const", referenced from:
tesseract::CubeObject::Recognize(tesseract::LangModel
, bool) in TesseractOCR
tesseract::CubeRecoContext::Load(tesseract::TessdataManager
, UNICHARSET
) in TesseractOCR
tesseract::CubeSearchObject::CubeSearchObject(tesseract::CubeRecoContext
, tesseract::CharSamp
) in TesseractOCR
tesseract::CubeSearchObject::CubeSearchObject(tesseract::CubeRecoContext, tesseract::CharSamp) in TesseractOCR
tesseract::CubeSearchObject::CharSample(int, int) in TesseractOCR
tesseract::CubeTuningParams::Load(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >) in TesseractOCR
tesseract::TessLangModel::TessLangModel(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, bool, tesseract::TessdataManager, tesseract::CubeRecoContext) in TesseractOCR
...
"std::__1::__vector_base_common::__throw_length_error() const", referenced from:
void std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > >::__push_back_slow_path<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >&&) in TesseractOCR
std::__1::vector<float, std::__1::allocator >::vector(unsigned long, float const&) in TesseractOCR
std::__1::vector<float, std::__1::allocator >::vector(unsigned long) in TesseractOCR
std::__1::vector<float, std::__1::allocator >::__append(unsigned long, float const&) in TesseractOCR
std::__1::vector<tesseract::NeuralNet*, std::__1::allocatortesseract::NeuralNet* >::__append(unsigned long, t

Can't open trained data

Hi,

First of all, thank you very much for the great framework.

But I have a trouble. When I tried to recognize, an error occurred as below.

Error opening data file /var/mobile/Applications/9C07D9F5-0B70-4313-90E0-17AF69FF0EDA/LicenseReader.app/tessdata/jpn.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory.
Failed loading language 'jpn'

Please see the attached images.

Thanks in advance.

finderscreensnapz001
xcodescreensnapz001

Tesseract 3.03

Hi,
Is there any plans to update the lib to use Tesseract 3.03 instead of 3.02? If so, is there an estimated date?

Thanks

64-bit added

Building for 32-bit devices it works, building onto a 5s fails because of the 64-bit

setVariable:forKey is not working

setVariable:forKey with parameters like:
@"tessedit_create_hocr" and @"TRUE", @"1", @"YES" doesn't seem to affect the output.

Only [tesseract setVariableValue:@"0123456789" forKey:@"tessedit_char_whitelist"]; seems to have the intended effect.

Otherwise, great effort at making this library easy to use.

Can't build Template Framework Project in Xcode 6.1/OSX10.10 targeting simulator

TesseractOCR Group
(null): Ld: warning: ignoring file TesseractOCR/lib/libtesseract_all.a, missing required architecture x86_64 in file TesseractOCR/lib/libtesseract_all.a (4 slices)ignoring file TesseractOCR/lib/liblept.a, missing required architecture x86_64 in file TesseractOCR/lib/liblept.a (4 slices)
Template Framework Project Group
Undefined symbols for architecture x86_64:
"tesseract::TessBaseAPI::GetBoxText(int)", referenced from:
-[Tesseract characterBoxes] in TesseractOCR
"tesseract::TessBaseAPI::GetIterator()", referenced from:
-[Tesseract getConfidences:] in TesseractOCR
"tesseract::TessBaseAPI::GetUTF8Text()", referenced from:
-[Tesseract recognizedText] in TesseractOCR
"tesseract::TessBaseAPI::SetVariable(char const_, char const_)", referenced from:
-[Tesseract setVariableValue:forKey:] in TesseractOCR
-[Tesseract loadVariables] in TesseractOCR
"tesseract::TessBaseAPI::SetRectangle(int, int, int, int)", referenced from:
-[Tesseract setRect:] in TesseractOCR
"tesseract::TessBaseAPI::Init(char const_, char const_, tesseract::OcrEngineMode, char*, int, GenericVector const, GenericVector const_, bool)", referenced from:
tesseract::TessBaseAPI::Init(char const_, char const_) in TesseractOCR
"tesseract::TessBaseAPI::Version()", referenced from:
+[Tesseract version] in TesseractOCR
"tesseract::TessBaseAPI::SetImage(Pix const_)", referenced from:
-[Tesseract setImage:] in TesseractOCR
"tesseract::TessBaseAPI::Recognize(ETEXT_DESC_)", referenced from:
-[Tesseract recognize] in TesseractOCR
"tesseract::TessBaseAPI::TessBaseAPI()", referenced from:
-[Tesseract initPrivateWithDataPath:language:] in TesseractOCR
"tesseract::ImageThresholder::GetPixRect()", referenced from:
-[Tesseract setImage:] in TesseractOCR
"tesseract::ImageThresholder::SetImage(unsigned char const_, int, int, int, int)", referenced from:
-[Tesseract setImage:] in TesseractOCR
"tesseract::ImageThresholder::ImageThresholder()", referenced from:
-[Tesseract setImage:] in TesseractOCR
"tesseract::PageIterator::BoundingBox(tesseract::PageIteratorLevel, int_, int_, int_, int_) const", referenced from:
-[Tesseract getConfidences:] in TesseractOCR
"tesseract::LTRResultIterator::Confidence(tesseract::PageIteratorLevel) const", referenced from:
-[Tesseract getConfidences:] in TesseractOCR
"_pixDestroy", referenced from:
-[Tesseract dealloc] in TesseractOCR
-[Tesseract setImage:] in TesseractOCR
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The result is really not good

I used the image with texts which is get by office word, but the result is really bad, should I do some other settings for the use like the encoding or something else? And by the way, where is the Chinese tessdata, I need to recongnize the Chinese as well. Thanks for your excellent work.

Enable Travis CI

@gali8, can you enable Travis CI for the repo so we can have continuous integration/testing for the library? Only the repository owner can enable it, otherwise I'd take care of it.

All you have to do is click this link: https://travis-ci.org/profile, sign in with your GitHub account, and then toggle the switch next to Tesseract-OCR-iOS so it says "On".

I'll take care of the rest (mainly writing the travis.yml file).

It will let us know within GitHub if a pull request someone submits builds the library successfully, and I can also start writing unit tests for the library that it can use to test the library anytime someone submits a new pull request.

Missing instruction for C++ compiler

Hi. First of all, thank you for the OCR framework. I have been testing a lot of compilations and yours was the easiest and cleaner way to add Tesseract in my iOS project.

Well, I just would like to add that the C++ Standard Library must be set to Compiler Default (as stated on https://github.com/ldiqual/tesseract-ios) otherwise any code using Tesseract won't compile.

In brief, the instruction should be:

...

  1. Go to your project, click on the project and in the Build Settings tab add -lstdc++ to all the "Other Linker Flags" keys.
  2. Go to your project settings, and ensure that C++ Standard Library => Compiler Default.
    ...

Use of tesseractrect

It could be possible to explain in the wiki one example of a call to tesseractrect, I have been searching for it. And I found many resources to implement tesseracrect in android(use of a rectangle to specify which part of the photo to decode)

arm64

I think did exactly as it is in th README file, but I get such compiler error:

ignoring file .../TesseractOCR.framework/TesseractOCR, missing required architecture i386
 in file .../TesseractOCR.framework/TesseractOCR (3 slices)

Can't Build Project for Release

I have an app using Tesseract which runs just fine in development, but when I want to archive it, I get a series of warnings:

warning: no rule to process file '...../Pods/TesseractOCRiOS/TesseractOCR/lib/liblept.a' of type archive.ar for architecture armv7
warning: no rule to process file '...../Pods/TesseractOCRiOS/TesseractOCR/lib/libtesseract_all.a' of type archive.ar for architecture armv7
warning: no rule to process file '...../Pods/TesseractOCRiOS/TesseractOCR/lib/liblept.a' of type archive.ar for architecture armv7s
warning: no rule to process file '...../Pods/TesseractOCRiOS/TesseractOCR/lib/libtesseract_all.a' of type archive.ar for architecture armv7s
warning: no rule to process file '...../Pods/TesseractOCRiOS/TesseractOCR/lib/liblept.a' of type archive.ar for architecture arm64
warning: no rule to process file '...../Pods/TesseractOCRiOS/TesseractOCR/lib/libtesseract_all.a' of type archive.ar for architecture arm64

And, of course, archiving fails due to undefined symbols for architecture.

Any tips on this?

I've read this can be caused by having the wrong files in "Compile Sources", but as far as I can tell, I only have .m files and core data models in there.

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.