A function for image morphing using OpenCV