GSoC 2009/Barcode scanner

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 [I do not see much point in this being done for GSoC unless the student is particularly interested in the algorithmic side of things.]
    2. improving the speed of existing code [Useful for 2D codes, but 1D code (e.g. batoo) is pretty fast already]
    3. writing wrapper/glue code to present a unified API to the user [wrap the existing codes so that they all present the same interface]
    4. supporting new barcode types [Either do 1.1 for the new code, or find and add some existing code to 1.3]
    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:

1D barcodes are generally UPC in the US ( and this is a subset of the EAN 13 which is used in Europe (

For 2D barcodes, the most popular ones are: