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:
- Barcode decoding
- 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.]
- improving the speed of existing code
- supporting new barcode types
- writing wrapper/glue code to present a unified API to the user
- 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)
- 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.
- Parsing e.g. Amazon (though I envisage having parsers for lots of different providers) to obtain
- Description (and other general info about the product)
- Price
- Images/thumbnails
- Track listing (in the case of CDs)
- Reviews
- 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.
- Parsing e.g. Amazon (though I envisage having parsers for lots of different providers) to obtain
- 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:
- GUI interface to scan barcodes (i.e. image/live-view window to see what you’re pointing at)
- 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.
- Database functionality in which to store multiple arbitrary tables containing the above information about each product (and probably a thumbnail too). E.g:
- CDs, DVDs, Books, etc. I own
- CDs, DVDs, Books, I’d like to get (i.e. a wishlist)
- Things I’ve loaned to someone (saying when and who)
- Shopping list
- 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