nvidia.dali.experimental.dynamic.experimental.remap#

nvidia.dali.experimental.dynamic.experimental.remap(input, mapx, mapy, /, *, batch_size=None, device=None, interp=None, pixel_origin=None)#

The remap operation applies a generic geometrical transformation to an image. In other words, it takes pixels from one place in the input image and puts them in another place in the output image. The transformation is described by mapx and mapy parameters, where:

output(x,y) = input(mapx(x,y),mapy(x,y))

The type of the output tensor will match the type of the input tensor.

Handles only HWC layout.

Currently picking border policy is not supported. The DALIBorderType will always be CONSTANT with the value 0.

This operator allows sequence inputs.

Supported backends
  • ‘gpu’

Parameters:
  • input (Tensor/Batch ('HWC', 'FHWC')) – Input data. Must be a 1- or 3-channel HWC image.

  • mapx (Tensor/Batch of float ('HWC', 'HW', 'FHWC', 'FHW', 'F***', 'F**')) – Defines the remap transformation for x coordinates.

  • mapy (Tensor/Batch of float ('HWC', 'HW', 'FHWC', 'FHW', 'F***', 'F**')) – Defines the remap transformation for y coordinates.

Keyword Arguments:
  • interp (nvidia.dali.types.DALIInterpType, optional, default = DALIInterpType.INTERP_LINEAR) – Interpolation type.

  • pixel_origin (str, optional, default = ‘corner’) –

    Pixel origin. Possible values: "corner", "center".

    Defines which part of the pixel (upper-left corner or center) is interpreted as its origin. This value impacts the interpolation result. To match OpenCV, please pick "center".