Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

the flow matrix contains the gradient of the movement between 2 frames. for each pixel location in the original frame, the channels contain dx and dy, so that prev_x + dx = cur_x, and prev_y + dy = cur_y.

(note, that the LK method writes absolute new position into the flow vector, while the farneback one writes differences)

the flow matrix contains the gradient of the movement between 2 frames. for each pixel location in the original frame, the channels contain dx and dy, so that prev_x + dx = cur_x, and prev_y + dy = cur_y.

here is a sample with visualization code

(note, that the LK method writes absolute new position into the flow vector, while the farneback one writes differences)