geek goodness

last night was proper geek time for me. last year i hacked together an old webcam and a 35mm lens cap so that i could attach a second-hand zoom lens to the webcam. it kind of worked but the pictures were weird (see my little profile icon here) and it was hard to use.

say cheese

well, now i’ve found a use for it – as a barcode scanner!

i’ve got another webcam but it can’t produce a big enough image of a normal barcode. my zoom lens cam works well. mind you, the webcam isn’t great quality and the lens is old and dirty and i’ve not looked after either whilst sticking them together or since, so the pictures are a bit iffy.


so, i found zebra – a bit of FOSS software that can scan in barcodes. had to install a few devel packages on fedora 8 to get it to compile. then i had to modify the code to get it to talk to the second webcam, not the first.

it still refused – turns out the webcam only supports GREY or YUV420p formats but the code only supports RGB24. a quick bit of googling and wikipediaing and coding and we had it accepting YUV420p and reading the black and white data correctly. … and barcodes appeared!!

can you tell what it is yet?

another fix was required to the zebra scanner so that it includes the check digit in its output – the searches didn’t work without it.

EAN-13: 0702727136221
EAN-13: 5060067000844
EAN-13: 5060034578109
EAN-13: 5022366552943
EAN-13: 5055201800763

the next nice find on the net was barcodepedia. loverly. great idea. didn’t have many of the DVDs i scanned. plus it looks like i might have broken it by pestering it with searches. sorry about that.

5022366552943 – Ghost in the Shell [Region 2] on
5023965343321 – Katakuri-ke no kôfuku on
5023965347428 – Mou gaan dou on
5023965350220 on
5023965351227 on

however, it did know about manufacturer codes, so even if it doesn’t know what DVD it is you can still find out who made it.

whilst looking at these extra details and trying it out on a book i saw that the barcode is actually the ISBN number. so i googled for an online ISBN search and was reminded to look at amazon.

and that made me think of just passing the barcode values to amazon in the first place – which works!

a little bit of scripting later and i can now point books and DVDs at my hacked up webcam and the titles from amazon pop up on the screen. 🙂

Tenchi Muyo! DVD Ultimate Collection (NTSC)
Wario Ware: Smooth Moves (Wii)
Azumanga Daioh – Vol. 1
Azumanga Daioh – Vol. 2
My Wrongs #8245-8249 & 117 [2002]
At The Height Of Summer [2001]
Ghost in the Shell: Stand Alone Complex – Solid State
Ghost In The Shell [1995]
The Happiness Of The Katakuris [2003]
Infernal Affairs [2004]
The Hitchhikers Guide to the Galaxy (2 Disc Edition) [2005]

next up – get more details from amazon and/or barcodepedia and save them to a CSV or XML file that gcstar can read.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s