Objective-C : is it possible to detect QR code data type? - iphone

I did qr code with Zxing, Right now I can read data but what I want is :
Example: Be able read type of QR Code is wifi, VCard, Calendar, url, etc...
if detect QR Code is wifi so I be able code to change wifi setting key,
So, how do i know that data read from QR code is wifi?

QR Code itself does not specify any types. Its plain text. It can be an HTTP URL or a custom URL. (e.g. it should have "type://wifi" inside it. You can then use it to see what the type is). But off-the-shelf, there is no such thing. You have to know who is creating the QR Codes and what is he storing in them.

There is no standard format for encoding wi-fi information in a QR code. There is a de facto standard suggested by zxing and supported by Barcode Scanner, which is like:
WIFI:T:WPA;S:mynetwork;P:mypass;;
(This imitates many of DoCoMo's standards for QR code contents.) I'd just reuse this if you can.
This page lists common encodings for other data. Whether you can do anything with them on the iPhone, I don't know. On Android you can scan these to configure Wi-fi and add contacts.

Here is a nice document of different QR code types. None of them are standard, but you get the idea: https://github.com/zxing/zxing/wiki/Barcode-Contents
There is platform specific format for Android.
WIFI:T:WPA;S:mynetwork;P:mypass;;
Though, if there is no API for setting the WIFI settings on iOS, any format doesn't help much :/

Related

Mobile barcode scanner for iOS/Android

I have done some research on barcode scanners available for iOS/Android and found ZXing framework to be a reliable free scanner SDK for auto-focus camera devices only(is this right?). My requirement is to scan a barcode on iOS/Android devices and the following operations should be performed:
Capture the barcode image and use a Barcode scanner SDK (like zxing) to scan the image and decode some details(like name, age and other personal details) from the barcode(I understand 2D barcodes formats like QR code are required for this purpose). Firstly is this possible and what will be the performance, speed, accuracy in this case?
But more importantly our customer has to design such barcode for us to decode(without any internet connectivity, all the details should be embedded in the barcode). Is this possible and if so are there any specific frameworks available, what are the essentials for such a framework?
Any help, useful links will be much appreciated. Thanks in advance!
Not sure about performance, speed and accuracy, but they'll be about the same as existing barcode scanner apps, since ZXing is a widely-used framework. You're right about needing a 2D barcode for that amount of data; bear in mind that the more data you encode into a 2D barcode, the harder it will be for a barcode reader to recognise.
ZXing can do this for you as well. zxing.appspot.com has the same code the ZXing website uses to generate barcodes. Just write an app that incorporates that and you're good to go. You can put any data you want into a 2D barcode, so it'll be up to you as to how you format that data. There are some existing formats (like vcards and web links), but it sounds like you want a custom format.
The easiest thing would be to have a look at the ZXing barcode reader app. Pretty much everything you want to do has already been done, and the Apache license is pretty permissive.

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

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.

how to read numbers in image?

I have used the library for reading barcode from image. But can't find any source or help for reading numbers from image.
I just need to take photo with camera and then process image whether any numbers exist and read out the numbers.
Is there any way to get the number written on image?
that's OCR type of problem. you might want to take a look at: Is there any good OCR API for iPhone and/or Android phones? or iPhone: Regarding OCR technology?
The Google Docs API has some OCR support. You may want to take a look at this and see if you can implement it: http://googlesystem.blogspot.com/2009/09/google-docs-ocr.html I don't remember if Apple will allow you to use any external libraries though.

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.