Optical Flow Operations#

The package includes functions to compute the optical flow between two images based on OpenCV DIS (Dense Inverse Search) algorithm. The optical flow can be computed for a specific channel of the images and for a specific region of interest. The computed optical flow can be visualized using quiver plots or color-coded flow maps.

Compute Optical Flow#

compute_optical_flow(image1, image2[, ...])

Compute the optical flow between two images using the DIS method of OpenCV.

Display Optical Flow#

display_optical_flow(image, flow_x, flow_y)

Display the optical flow overlaid on the given image using Matplotlib.

display_optical_flow_quiver(image1, image2, ...)

Display the optical flow as a quiver plot overlaid on the given images using Matplotlib.

Examples#

See a complete example in the gallery: Computing optical flow between two images.