Chris J. Karr, January 27th, 2010
Since the most common e-mail complaints that I received about Books dealt with barcode scanning and quickfill, I thought that a post on the current state of these topics in Codex would be helpful.
Read more for updates and screenshots.
Barcode Scanning
In short, I have a new working barcode system up and running. I’ve been collaborating with Conor Dearden to create an open-source successor to create a replacement for theĀ open-source barcode scanner that Books used. As frequent users can attest, the fixed-focus of the cameras on shipping Macs makes it difficult to obtain a good scan consistently.
The approach that we’re using in this new module is a “meta” approach. Basically, instead of relying upon a single scanning algorithm to detect a barcode, we can rely on several to “vote” on what the scanned barcode is and we take the barcode with the highest number of votes and return that as the scan. As we verify which final barcode predictions are most accurate, we can begin to weight the votes of different algorithms to produce an aggregate scanner that is more accurate than any of the individual parts. (This is called adaptive boosting.)
Currently, we have an initial framework up for creating individual scanners and Conor is working on adapting his existing algorithm to this system. On my end, I’ve been able to successfully adapt the Zbar scanner and I am currently evaluating some of the research efforts in the machine vision field for inclusion. Current algorithm candidates include Tekin & Coughlan 2009 and Joseph & Pavlidis 1994. In terms of video image acquisition and processing, we’re using the cross-platform OpenCV framework. Below is a snapshot of the system in action using the Zbar algorithm:
Zbar works well for a lot of cases and my hope is that some of the more research-oriented algorithms will take care of some of the cases that drop through the cracks.
Quickfill
Since I swore off using Amazon as a data provider for Codex (here’s another example why), I’ve been looking into alternative sources for book metadata. My original hope was that I would be able to start a financial relationship with OCLC (a very large union catalog) where I could pay them for Codex users’ access to their cataloging information. Unfortunately, it seems that the OCLC’s managers couldn’t wrap their minds around someone paying them for access to their catalog, so my first choice for metadata is officially “kaput”.
My current Plan B is for Audacious Software to provide a Codex server for lookup needs and all the difficulty of managing communication with other sources is handled at the server level (federated search). The basic way that this would work is as follows:
- A user enters/scans a barcode.
- Codex uploads the barcode to the Codex server.
- The Codex server relays the request to a variety of other servers, including the Library of Congress and Google Books.
- The Codex server aggregates the results obtained from third-party services and relays them back to the user.
- The user selects which metadata ends up in their record.
The first iteration of the Codex server would be a simple dumb proxy – it sends requests to endpoints and relays the results back to the user. I’m currently considering other iterations where Codex users could contribute metadata of their own and the Codex server itself becomes an endpoint for metadata searches and begins to rely less on third-party sources.
Since implementing the Codex server has a few legal and financial challenges, I haven’t written any code and I’m currently still planning how to make it a reality. The legal challenges largely consist of reviewing any restrictions placed on metadata by third parties so that I don’t expose myself to the liability of caching data that I shouldn’t. The major financial challenge is determining whether I have the resources to begin accepting user-submitted metadata in future iterations. I currently have the resources to pull off the dumb proxy version of the server, but I’m still evaluating the costs of trying to build out an eventual global replacement for catalogs on the scale of Amazon and OCLC.
Closing
So, that’s the state of barcode scanning and metadata lookup in the Codex universe. I’m happy with the progress that I am making, but there’s still quite a bit of work ahead of me. Stay tuned for regular updates.


January 28th, 2010 at 4:06 pm
Here is something you might be interested in looking at as a possible records source – Open Library is a site that is attempting to index “every book ever published.” The site is at http://openlibrary.org/. I stumbled across it while looking for information to assist me in cataloging a small resource center. What’s really different about it is that anyone is able to upload information about their books and add information to existing records.