CardSpotter is a browser extension that shows automatic Magic:The Gathering card image tooltips for
It works by grabbing data from HTML5 video, extracting the clicked card using OpenCV and then finding the best match from a database using image hashing.
If you wish to modify CardSpotter this wiki page should get you started: How to modify CardSpotter