1

I would like to make a sweet iphone app that reads barcodes and generates a scene based on it. Anyone have any resources they can link me to or perhaps describe the process of their barcode implementation, just so that I'd have a place to start? What kind of info is in a barcode?

Edit: Can I actually do anything with the barcode info? What's the size of the info on it?

davidahines
  • 3,976
  • 16
  • 53
  • 87
  • 1
    Possible duplicate of [barcode framework for the iphone?](http://stackoverflow.com/questions/838724/barcode-framework-for-the-iphone) – Brad Larson Jan 27 '11 at 22:03
  • 1
    The topic of iPhone barcode reading comes up frequently here, so you could also look through the other questions that have been asked about this: http://stackoverflow.com/search?q=%5Biphone%5D+%2Bbarcode – Brad Larson Jan 27 '11 at 22:05

1 Answers1

0

I'll try and explain this...

Bar codes essentially translate to keyboard input. That is from your application's point of view, it would look like someone has entered some data via a keyboard.

Now in order to actually "read" the barcode, you typically need a barcode scanner. Of course these scanners work specifically with specific types of bar codes (1D and 2D bar codes). However, what you have on a cell phone is a camera and not a barcode scanner. So basically what you'll need is software that does the following

  1. Takes picture of a barcode (that is the barcode is there in the picture somewhere)
  2. Processes this image to "extract" the barcode information from it
  3. Passes on this information to your application as if it were key strokes on a keyboard.

Nowadays you also have the concept of JPEG color barcodes. These are barcodes that look like colorful images. http://www.sersc.org/journals/IJSIP/vol2_no4/4.pdf

multi-format 1D/2D barcode image processing library for cell phones http://code.google.com/p/zxing/

Shiv Kumar
  • 9,599
  • 2
  • 36
  • 38
  • 5
    There is absolutely no need to simulate key strokes on a keyboard when scanning barcodes. USB scanners only do that because it is the easiest way to get data to a computer without needing a driver. – bbum Jan 27 '11 at 19:17
  • 1
    I was describing a process as the OP asked. Of course there are many ways in which this is done. What I was trying to get across was that barcodes contain "data" and this data is passed along to your application. How that data comes across varies from situation to situation and process to process – Shiv Kumar Jan 27 '11 at 19:41
  • 3
    Sure -- but keyboard? Totally irrelevant. – bbum Jan 27 '11 at 20:44
  • Can one do things with the data aside from SKU related stuff? Like is what I'm describing possible? – davidahines Jan 31 '11 at 20:15
  • Barcodes can contain all kinds of information. 2D bar codes in particular (for example the Data Martix bar code) can contain a ton of information. However, if you're not the one creating the barcode then you'll have to work with what the barcode contains. 1D barcodes typically contain very little information such as the SKU. As regards your other question. Technically, it is possible to read the barcode if you have an image of the barcode. Can you do it on the cell phone? The second link I posted in my answer points to software that can do that. So yes, you should be able to do it. – Shiv Kumar Feb 01 '11 at 03:07