pupil_recording_interface.OpticalFlowReader.calculate_optical_flow

static OpticalFlowReader.calculate_optical_flow(frame, last_frame)

Calculate dense optical flow between two frames.

Parameters
  • frame (numpy.ndarray) – The input frame.

  • last_frame (numpy.ndarray) – The previous frame.

Returns

The dense optical flow between the frames.

Return type

numpy.ndarray