OpenCV for this as a basis. there is also OpenCV-Python, but you need to know how to use numpy, i used to use this to do image detection experiments faster