Shortcuts

mmcv.video.flow_warp

mmcv.video.flow_warp(img: numpy.ndarray, flow: numpy.ndarray, filling_value: int = 0, interpolate_mode: str = 'nearest')numpy.ndarray[source]

Use flow to warp img.

Parameters
  • img (ndarray) – Image to be warped.

  • flow (ndarray) – Optical Flow.

  • filling_value (int) – The missing pixels will be set with filling_value.

  • interpolate_mode (str) – bilinear -> Bilinear Interpolation; nearest -> Nearest Neighbor.

Returns

Warped image with the same shape of img

Return type

ndarray