Emergency Exit


CokeTunes

Posted in Development by McZonk on the April 17th, 2008

Coke + iTunes

Inside of very german Coca Cola cap is a code to download a fourth iTunes song, so 4 caps = 1 song. I do not drink coke, but my brothers have a high Coca Cola consumption. Manually type in all the codes is very annoying and I always wanted to do some research in image recognition. So I have written some code to automatically detect the key inside the cap.

Step 1 - Original ImageStep 2 - Detect Center

Step 3 - Gray ScaleStep 4 - Adjust Brightness

The first problem is take a good image. I made a mark on my desk where to put the cap. The code has to be in the upper part of the image. The next step is to find the center and crop the image. This is done with simple pattern matching of a mask. Removing the colors and adjust the brightness is a simple batch job.Arrange the code in a straight line is done by a simple program I have written with OpenGL. It uses the image as a texture and draws a quad strip with circular texture coordinates.

Step 7 - Arrange in a line

In the end I pass the final image to an open source OCR tool. At the moment the recognition rate is around 50%. But maybe I can improve this.

Coke Caps

P.S.: The pictured codes are unused. So this is your chance to get a free song.

6 Responses to 'CokeTunes'

Subscribe to comments with RSS or TrackBack to 'CokeTunes'.

  1. Jeremy said,

    on April 22nd, 2008 at 16:24

    Hallo Max!

    Du hast wirklich zu viel Zeit, oder?
    Was macht Deine Master-Bewerbung?

    Gruß,
    Jeremy


  2. on April 28th, 2008 at 2:52

    […] Cola consumption. Manually type in all the codes is very annoying and I always wanted to do some rhttp://emergencyexit.untergrund.net/2008/04/coketunes/Get FREE 25 song playlists on iTunes!Join the Apple Students group on Facebook and each week, you […]

  3. PhoeniX said,

    on June 6th, 2008 at 22:57

    no more updates? :(

  4. BrooksyX said,

    on July 3rd, 2008 at 20:06

    Hey McZonk any new updates on Quake 2 for us? Hope everythings going all right for you man. Thanks for all your hardwork so far!

  5. PhoeniX said,

    on July 4th, 2008 at 12:35

    we want updatesss

  6. Brokoslav said,

    on July 16th, 2008 at 15:22

    McZonk: Still Wanted for finishing Quake 2 :-)

Leave a Reply