Flow2RGBA

Encodes a 2D optical flow field as RGBA color.

Encodes a 2D optical flow field as RGBA color.

The encoding uses the HSV color wheel to encode angle, with some modifications:

  • Saturation increases linearly with the norm
  • Value increases logaritmically with the norm.
  • For norm equal zero, the RGB value is black
  • For vector norms greater than max_flow, set value to 0.8.
  • Invalid pixels are coloured white.

Parameters

max_flow : float. Defaults to 1.0. The maximum norm of any vector in the field.

Inputs

in_flow : ImageView. {rg16f, rg32f} image. Input optical flow

Outputs

out_rgba : ImageView rgba8ui image. The encoded color of the optical flow field.