As ios dev, the OCR ( https://github.com/gali8/Tesseract-OCR-iOS ) is quite good for iPhone devices.
How can easily get the OS X OCR version from this code ? Thanks,
You can compile tesseract and leptonica by yourself in Xcode. The resulting binary can be used in Mac and iOS as well. Check the Xcode examples here:
https://github.com/mcku/tesseract-osx
https://github.com/mcku/leptonica-osx
I got a version of Tesseract for my Mac 10.9 from the repository here: http://code.google.com/p/tesseract-ocr/downloads/list.
The documentation was here: http://code.google.com/p/tesseract-ocr/wiki/ReadMe
I did have download the specific language, as well.
The current home of Tesseract-OCR is here on GitHub.
They recommend installing on OSX using macports or homebrew. However, the current version available in macports is only 3.02 (same as on the archived google code site). If you require the more recent 3.04, you need to compile it yourself (just follow the instructions on the wiki page).
Related
I'm trying to get ImageMagick to work in my iOS project. Unfortunately everything I have tried so far has not worked.
Cocoapods
The most obvious approach would be to use the cocoapod. Unfortunately after installing the cocoapod there doesn't appear to be anything exposed to swift to import. Maybe I'm missing something obvious and if anyone has any ideas that would be great. Unfortunately the documentation is lacking as far as specific examples go.
Static library - approach #1
The official ImageMagick docs provide some instructions to compile the latest version of ImageMagick and include a static library in your Xcode project. Unfortunately the first step of the instructions requires running a bash script imagemagick_compile.sh which I cannot find. Once again I could be missing something obvious.
Static library - approach #2
After some additional searching I found the ~Claudio guy which the ImageMagick docs mention as the maintainer of the iOS version of ImageMagick. He has a repo with similar instructions as provided by ImageMagick but this repo includes a bash script to compile and generate a static library of ImageMagick. I tried running the script directly ./all.sh 6.8.8-9 but soon realized I hadn't setup a build directory they way his instructions outlined and I got stuck getting libpng installed correctly.
Static library - approach #3
The same repo with the instructions to compile and generate a static library also includes an old sample iOS project with a static library already included for an older version of ImageMagick. This just about worked except the ImageMagick library has a class Timer that clashes with the Timer class provided by Swift4/iOS so I couldn't get my project to compile using this static library of ImageMagick.
ImageMagick iOS Questions on SO
There are a handful of other questions on Stack Overflow that deal with running ImageMagick on iOS so I know other people have done it but nothing very recent. If anyone has any ideas that would be greatly appreciated, thanks!
Un-answered question on how to use ImageMagick on iOS: ImageMagick iOS image Potentially useful comment that includes some of the same links that I provided above.
Someone already using ImageMagick for iOS but gives no details on how it was implemented: ImageMagick circular dstortion on iOS
Un-answered question from someone already using ImageMagick in their app: Ios - ImageMagick - No Image Created after Distortion
More recent question related to warnings using the cocoapod version: iOS: ImageMagick compiler warnings in Xcode
Other questions: https://stackoverflow.com/search?q=imagemagick+ios Unfortunately I haven't found any of these that have helped.
To integrate ImageMagick into iOS you will need to do the following:
Install the library available here https://www.imagemagick.org/download/iOS/
You will need a Swift-Objective-C bridging header that includes:
#import "ImageMagick.h"
#import "MagickWand.h"
You will need to modify any functions that reference Timer to Foundation.Timer, this will resolve any conflicts with the ImageMagick library
You will need to add under Your target > Build Phases > Link Binary With Libraries > "libxml2.tbd".
Hope this helps
I got an email from Google play store regarding - "Google Play warning: You are using a vulnerable version of libpng".
Email contains the below information -
https://support.google.com/faqs/answer/7011127
I didn't use libpng library in my application anywhere. But, In my android application, I am using the OpenCV2.4.5 library. After searching in the internet, I came to know that the OpenCV library uses the libpng.
My question - The upgrading of OpenCV2.4.5 to OpenCV3.1.0 will resolve "vulnerable version of libpng" warning?
The vulnerable version of libpng in OpenCV 2.4.x was updated in OpenCV 2.4.13.1.
It can be downloaded from here.
As #Simon says, OpenCV 3.x is not affected.
More info: #6694 OpenCV 2.x uses vulnerable version of libpng
Yes, now confirmed with Google: Updating to 3.1.0 will fix the issue - I've upgraded one of my apps to 3.1.0, and while there's a bit of a bug in Google's detection of this vulnerability, I've had confirmation from a support representative that the new version is not vulnerable to this issue.
--
Previous answer:
No - I've upgraded to 3.1.0 and still get the warning. Edit: see below for update
The OpenCV Android SDK hasn't been updated since December 2015, so hopefully a newer version this year will use a fixed version of libpng.
Edit: some odd behaviour on Google Play, and some digging into the version of libpng that that OpenCV 3.1.0 uses leads me to think that 3.1.0 is not vulnerable. I updated my app and the vulnerability warning was still there (with its warning text updated to the new APK version number). Now, however, Google Play has dismissed the alert, though it still confusingly refers to the new version as vulnerable.
I've installed xcode 5 and noticed that gcc compiler is deprecated. Assuming that I don't want to switch to Apple LLVM 5.0, here come my questions:
Is it possible to use iOS7 SDK and still compile in llvm-gcc-4.2?
If yes, how to do this?
If you don't know if that's possible, please don't post answers like "use clang, man", because they are not actually answering the questions I've posted.
Apple has removed the support for llvm-gcc-4.2 in XCode 5. Even if you install and change your base sdk to 6.1 sdk, you won't be able to build using llvm-gcc-4.2. So your only option is to continue using XCode 4.x if you want to use llvm-gcc-4.2.
LLVM-GCC is not included in Xcode 5.
I got above line from
https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_5_0.html
So the question is what to use instead of llvm-gcc ?
Is it possible to use iOS7 SDK and still compile in llvm-gcc-4.2?
If you want to compile your whole app using llvm-gcc-4.2: Probably not. I haven't checked this myself, but the iOS 7 headers would only need to add a single dependency on a clang feature missing in llvm-gcc-4.2 and you're swimming in compile errors. You may be able to hack your way through them, but it would likely be easier (not to mention more future-proof) to suck it up and upgrade to clang.
If you only need to compile some of your app using llvm-gcc-4.2: Sure, as long as you don't need to import any iOS 7 headers in the parts that you build with llvm-gcc-4.2.
You could try moving the problematic bits off to a static library, compiling that with gcc, then linking in to the final app, built with clang. You won't be able to target 64-bit, as llvm-gcc-4.2 doesn't can't generate armv8 code, but it should work otherwise.
One caveat: If your static lib uses C++, there may be some problems due to ABI and std library differences. But those are solvable problems, at least.
You could use homebrew to install the gcc version you need. Most probably all your Makefiles will need to be corrected (sigh)
I did:
brew search gcc
And the results:
homebrew/versions/gcc43
homebrew/versions/gcc45
homebrew/versions/gcc47
homebrew/versions/gcc49
homebrew/versions/gcc44
homebrew/versions/gcc45
homebrew/versions/gcc48
homebrew/versions/llvm-gcc28
homebrew/dupes/apple-gcc42
We've searched the net for this matter but couldn't find a proper answer.
It is known that lighthouse project is for porting Qt programs to IOS but there's no documentation about using it or compiling it on Mac. Any suggestions in this matter?
There's another work in progress the project qt-iphone which while compiling in mac we get the error " it seems that you dont have "make" or "gmake" " and we couldn't find the solution on the net about fixing it.
Any solutions?
http://www.mediator-software.com/
The latest sdk just released couple of days ago, hope it helps.
Qt now supports this natively starting with Qt 5.2.
I know that OpenCV was ported to Mac OS X, however I did not find any info about a port to the iPhone.
I am not a Mac developer, so that I do not know whether a Mac OS X port is enough for the iPhone.
Does anyone know better than me?
OpenCV does indeed work on the iphone. Use the configure script here to compile the library: cross compiling for iphone
You just have to cross-compile just as you do your apps.
OpenCV now (since 2012) has an official port for the iPhone (iOS).
You can find all of OpenCV's releases here.
And find install instructions here:
Tutorials & introduction for the new version 3.x
The latest build script from Computer Vision Talks works great for Xcode 4 and iOS 4.3 . I have tried the script myself and it is just awesome!
Here is opencv2.0 on iPhone iphone opencv test
OpenCV is now available as a framework for iOS. Just drag and drop into your project. It supports video capture too. See the article and get the example project here: opencv framework for ios
For the sake of transparency, I wrote this article and it is hosted on my company's website.
I haven't tried using OpenCV specifically, but I do dev for the iPhone and can say that most libraries I've tried that work on OS X DO NOT work on the iPhone out of the box. Some of them just needed a little tweaking/configuration to be done and then it was fine on the iPhone, but the reality is that the phone is missing quite a few backend components that OS X supports. Most complex libraries (OpenCV sounds like one of them) aren't going to work without a major effort - particularly since OpenCV sounds like it depends on several other external libraries as well...so those would have to be ported too.
All you need is to generate XCode project for OpenCV project using cmake or cmake gui tool.
Remember to set option to generate XCode project instead of the default option to use CMakeFiles.
Open generated project, change the base SDK to iPhone SDK, and hit build!
Since OpenCV does not support iOS at now (but they has announced iPhone support in version 2.2), highgui library won't compile. So if you need camera access you have to write it yourself.
Anyway, other libraries should compile and work on the device. (Works for me).
iPhone do support OpenCV if you want to use it first go to the best OpenCV on iPhone Documentation on the web: Yoshimasa Niwa's
I used it and i already have an app on the AppStore that uses Face Detection and Image Processing: Flags&Faces if you have any doubts please contact me.
Note that OpenCV runs very fast on Intel chips but the iPhone is arm. Of course OpenCV is extremely useful but it won't be that fast. Also, there's no way to get a live video stream on the iPhone so all of the normal potential CV applications sort of lose their appeal, don't they?
You can also install OpenCV using a package manager like Cocoapods.
To quote the installation guide:
You want to add pod 'OpenCV', '~> 3.0' similar to the following to
your Podfile:
target 'MyApp' do
pod 'OpenCV', '~> 3.0'
end
Then run a pod install
inside your terminal, or from CocoaPods.app.
Here's modified script (based on the one from LambdaJive) that builds universal OpenCV framework for iPhone/iPhone Simulator - universal-i386arm opencv framework
The following post by Yoshimasa does indeed work with I OS and the IPhone 4 and is able to access both the front and back cameras.
The link to the project is using opencv on iphone en
and the sample code is at webgit and it is linked from this article. I really encourage to read the article before getting the source code.
A project utilizing opencv on the iPhone (Lucas-Kanade optical flow to be exact). Source code available and app is on the AppStore as well -