Ask Your Question

Revision history [back]

Applying dense optical flow to image

I need help in applying dense optical flow to an image. This is how I'm generation flow:

flow = cv2.calcOpticalFlowFarneback(prev,next, None, 0.5, 3, 15, 3, 5, 1.2, 0)

I want to apply this flow to prev image to somehow create next image. Any idea how this is possible? I'm using python 2.7 and opencv 3.1

Following is next image:

image description

Following is prev image:

image description

Purpose of this exercise is to replicate DeepWrap gaze manipulation paper. https://sites.skoltech.ru/compvision/projects/deepwarp/

There is already a solution available but I guess it for some different version. https://stackoverflow.com/questions/44535091/convection-of-an-image-using-optical-flow