Python implementation of example-based super resolution