That's very cool, and surprisingly accurate in many cases! Any chance you'll let us peek at the code? ;) |
Yes – It is very clever however he has managed to do it. The matches are very close. |
The code is quite simple. (In previous pattern matchers I always wrote trying to optimize speed, so I stored certain representations of the images for faster parsing. This time, I didn't feel I was at the point where this was necessary.) I hope the pic below explains...
http://blogoscoped.com/files/pattern-matching-algo.png |
Really interesting to see how that works behind-the-scenes, thanks! I've been meaning to learn some PHP image handling for a while now. |