mmcv.video.flow_warp¶ mmcv.video.flow_warp(img: ndarray, flow: ndarray, filling_value: int = 0, interpolate_mode: str = 'nearest') → 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