Thanks for playing it!
I'll copy-paste an answer I gave to another user :P
I had to rewrite it a few times but the logic is simple: when you click "compare" it takes a snapshot of both target and player disc, reduce both images to 128 x 128 (with no antialasing) then divides the pictures in several concentrinc circles. Then it just looks ad the quantity of color in each section and compares it with the other side.
It's actually not a very accurate method of picture matching, but I prefer it that way so even less skilled player could get at least 1 star at every level easily :)