You need something able to run OpenCV2 at least (use the python interface, not C++), and read up on
correlation techniques for shape recognition.
You can't do this easily on a microcontroller. OpenCV under python is the best bet for prototyping
something quickly.