GSoC 2009/Barcode scanner

(changed typo)
(Added some notes on background reading)
Line 26: Line 26:
### Shopping list
### Shopping list
### Etc. (multiple tables, so the choice is up to the user)
### Etc. (multiple tables, so the choice is up to the user)
 +
 +
'''Background information about barcodes'''
 +
 +
Wikipedia has a good overview of barcodes in general: http://en.wikipedia.org/wiki/Barcode
 +
 +
1D barcodes are generally UPC in the US (http://en.wikipedia.org/wiki/Universal_Product_Code) and this is a subset of the EAN 13 which is used in Europe (http://en.wikipedia.org/wiki/European_Article_Number).
 +
 +
For 2D barcodes, the most popular ones are:
 +
* QR code: http://en.wikipedia.org/wiki/QR_Code
 +
* Data matrix: http://en.wikipedia.org/wiki/Datamatrix
 +
* PDF417 is another 2D code that might be worth looking at (a GPL decoder exists and this symbology is used). It is a stacked 1D code, making it 2D: http://en.wikipedia.org/wiki/PDF417

Revision as of 16:01, 31 March 2009

Barcode Project

The way I see it, there are 3 areas in which work could be done, or all 3 or combinations thereof could be combined. These are:

  1. Barcode decoding
    1. writing new algorithms to decode barcodes for which there is existing code
    2. improving the speed of existing code
    3. supporting new barcode types
    4. writing wrapper/glue code to present a unified API to the user
    5. adding quick “identifier” functions, which can be used to select which barcode type is being scanned (this is useful if the main decoders are somewhat slow and therefore you don’t want or have the time to run each one back-to-back on the same image data)
  2. Obtaining information about a decoded barcode. I’m thinking mainly of 1D codes here, and therefore using the EAN/UPC/ISBN data. 2D codes also have lots of uses and someone might want to try to obtain data for these after they are decoded.
    1. Parsing e.g. Amazon (though I envisage having parsers for lots of different providers) to obtain
      1. Description (and other general info about the product)
      2. Price
      3. Images/thumbnails
      4. Track listing (in the case of CDs)
      5. Reviews
    2. Once we know what the product is, there is the option to search other providers to see where said product is cheapest, which provider is the closest (i.e. using integration with on-device location services), etc.
  3. Presenting and storing the above information so it is useful for the user. I have started doing some work on this last bit (see the simon_wip branch of maemo-barcode), but my code is very basic at the moment, and certainly needs lots more work if someone wants to work on this part (or even wants to replace it). I envisage something along these lines:
    1. GUI interface to scan barcodes (i.e. image/live-view window to see what you’re pointing at)
    2. Display of information about a scanned barcode (i.e. barcode/isbn + online look-up info if a web connection is available, or ask if the user wants to connect to look-up the product). If the barcode is 2D and contains a URL then spawn the browser, if it just contains text then display the text, etc.
    3. Database functionality in which to store multiple arbitrary tables containing the above information about each product (and probably a thumbnail too). E.g:
      1. CDs, DVDs, Books, etc. I own
      2. CDs, DVDs, Books, I’d like to get (i.e. a wishlist)
      3. Things I’ve loaned to someone (saying when and who)
      4. Shopping list
      5. Etc. (multiple tables, so the choice is up to the user)

Background information about barcodes

Wikipedia has a good overview of barcodes in general: http://en.wikipedia.org/wiki/Barcode

1D barcodes are generally UPC in the US (http://en.wikipedia.org/wiki/Universal_Product_Code) and this is a subset of the EAN 13 which is used in Europe (http://en.wikipedia.org/wiki/European_Article_Number).

For 2D barcodes, the most popular ones are: