tfa.image.translate_xy

View source on GitHub

Translates image in X or Y dimension.

Args:

  • image: A 3D image Tensor.
  • translate_to: A 1D tensor to translate [x, y]
  • replace: A one or three value 1D tensor to fill empty pixels.

Returns:

Translated image along X or Y axis, with space outside image filled with replace.

Raises:

  • ValueError: if axis is neither 0 nor 1.