iphone camera used in app to scan (like red laser) - iphone

I am working on an app that requires the use of a camera to scan in text. Basically without getting too detailed, I need to point the camera at something (for my purposes here I will say a license plate) and i need to point the camera at the plate, and have it somehow save the digits into a string within the app. i guess its similar to Word Lens or red laser where it doesnt actually take a picture, it just scans the view and returns information. i have not been able to find much about this so any help on how to write this kind of code would be greatly appreciated!!

This is not barcode scanning. This is called OCR (optical character recognition), and there are some free and opensource libraries available that do this.
For example, Tesseract is a complete OCR engine written in C++ (it has a C++ interface, so it can be easily used from within an iOS app).
The other solution is gocr, the GNU Optical Character Recognizer. This is supposed to be a standalone program (a command line tool), but I've had success extracting its essential parts into a library (and I used it in an iOS project of mine as well).
OpenCV is a complete computer vision library. You can implement OCR using it - just google for the adequate documentation and tutorials.

Related

Augmented Reality : Recognize hand written number?

I am trying to find a solution for this AR app as the topic tells.
I want my app to recognize a hand-written number by the user.
The app will tell the user to write down for example number 24 on a paper and move the camera over the written number to see the 3d object.
This might be used for saving a Birthday, a wedding date .. etc
For accuracy, the app instructions will show the user a preview to tell please write the number 24 similar to this..
Although each hand writing will differ, but at least we do not get curly "2"-s or "4" with an open edge ..etc
So here we need AR to recognize the number, or be able to read the number according to approximation.
And the first question is: Is such a behavior doable or anyone familiar with a similar concept?
After searching similar apps, I found "Ink Hunter" apps for tatoo preview-s, although these apps use symbols not number, but we can think of a number as a symbol as well.
Also as this video: https://www.youtube.com/watch?v=9rXJcIE2Fcs shows, each user draws the symbol in a different way and still they get it working.
I am using Unity3d and Vuforia.
Vuforia offers free samples(unity3d packages) on the website, and there is one named "Text Recognition" , and here's the tutorial link: https://www.youtube.com/watch?v=W3MK6nC5FWE
But unfortunately couldn't make it work.
If someone has developed such a functionality using these sample projects from vuforia or have any ulternative method please I need you help :)
thanks in advance moghes
Here's a tutorial our team created on text recognition using the Hololens and Vuforia with Unity: https://www.youtube.com/watch?v=WdMeHgD4fMY. In the first portion of the video, we show how to get text recognition working with just Vuforia and Unity - no Hololens required. For your application, just change the text to numbers.
I believe the biggest challenge you will have is the "hand-written" component. From our research, Vuforia prefers computer-generated, predefined font types.

Android/iPhone Image parsing

I wanted to write an Android and/or an iPhone app that entails taking a picture of something (right now, I just want to limit to text) after which the app parses the text to make use of it. For example, perhaps taking picture of a sentence (or may be just fragments) will be then parsed by the app to bring up more information about the book. Title, author, ISBN etc. And even may be information about other books that are similar in content to this book.
Is this possible to do something like this? Is there an API that exists already that parses the content of an image? How is an image stored in Android and iPhone? Is it possible to implement the app in one platform and not the other?
I'd appreciate any input or advice that you guys have to offer. Thank you!
You're looking for this, possibly.
It's called OCR, or Optical Character Recognition.
Also check out ZXing a great library for decoding one- and two-dimensional barcodes. There are both iPhone and Android versions.

Bar code recognition in apps

I wanted to ask how does Bar code recognition apps works (like Goggles)?
Where do they get the bar code information?
There are a variety of standard formats for barcodes. Typically, a barcode app will (somehow) apply some image processing to determine which kind of barcode it's looking at, and then interpret the image accordingly. Figuring out which kind of barcode boils down to making an educated guess based on some set of heuristics.
Once you know which kind of barcode you're working with, it's much easier to process it.
See also: QR Code#Standards.
Google Goggles and Google Shopper use a (modified) version of the ZXing library for barcode scanning. Not surprising as it is all from Google. The barcode data comes from internal sources and from sites on the web.

how to do image morphing as in FatBooth app - iPhone

I want to build a similar app as fatbooth and want some ideas on how to do this. I googled for Image morphing in iPhone but didn't find anything. Should I use some server side language to morph Image?
Any help would be much appreciated!
Thanks
Saurabh
The only language you can really use is C# or c++. the maths is very complicated although I am sure you can get a book or two that cover image manipulation.
I don't know if there is an open source morphing framework, but that is your best option - it doesn't have to be specific to the iPhone, but the integration will be hard.
I don't know what you mean about server side, unless there is a server you know of that does it and you want a wrapper around it
For starters, take a look at displacement mapping: http://www.imagemagick.org/Usage/mapping/
Basically, you use grayscale images to bloat/shrink/squeeze/etc parts of a person's face. I made an app called FaceCraze which had to implement a poor man's FatBooth as part of the face transformation, and I used grayscale images very similar to the examples in http://www.imagemagick.org/Usage/mapping/#spherical
edit: You can use the ImageMagick library in your iOS apps too: Link

How do you make maps in Flash CS4 and then use them in iPhone games?

I was watching a video showing an ngmoco rolando2 level designer.
He seemed to be using flash CS4 to make the maps.
Would anyone know how I would go about doing this?
Just in case you need to know, I am an intermediate programmer, I know both Java and Objective-C pretty well.
I don't know if any of what I'm about to say is true or not, but hopefully my input will be helpful:
It could be simply that the level used in Rolando are simply vector graphic images and the designer you saw in the video simply preferred Flash CS4 as his vector editor?
Again, I could be wrong here.
It's also possible that the game has some code that decodes flash files into usable levels somehow - assuming this would be permitted by Apple in regards to their "no interpreters" rules.
My final thought, which in my opinion would be the least likely, is that the game may be a flash game compiled to run on the iPhone using Adobe's beta flash-iphone SDK. I say this would be the least likely as I believe ngmoco haven't used this method in any of their previous games and I don't see why they would suddenly resort to this method of developing iPhone apps.
In my game Hudriks I also used flash to design levels and even make some animations.
There is no any tool to do this, so you need to develop it yourself with requirements for your game.
First of all, it depends on your game and what exactly you need to design in flash - just putting images, defining their parameters (bonus values), ground path, etc.
After that it is important to define structure of your flash file - how you store different levels (in symbols or scenes), what layers for each level you have (boundaries, objects, obstacles, etc).
If you need to have some extra information for you objects in flash, most probably, you will need to develop custom panel in flash to setup all parameters. I used setPersistentData for storing information for flash objects.
After that you need to develop script that goes through all objects in your symbols and extracts basic information, like transformation, and your custom data. I faced some problems with getting correct transformation values, especially for rotation. Had to do extra heuristics.
For animations I just used motion tween data. In my animation framework did simple implementation supporting basic parameters (transformation and alpha) and only linear curves. Fortunately, in Flash CS4 there is function copyMotion that gives you XML for the animation. You just need to parse it or convert to your own format.