translate

Stoner.Image.imagefuncs.translate(im, translation, add_metadata=False, order=3, mode='wrap', cval=None)[source]

Translate the image.

Parameters:
  • im (ImargeArray,ImageFile) – Image data to be worked with.

  • translation (2-tuple) – translation (x,y)

Keyword Arguments:
  • add_metadata (book) – Record the shift in the image metadata order (int): Interpolation order (default, 3, bi-cubic)

  • mode (str) – How to handle points outside the original image. See skimage.transform.warp(). Defaults to “wrap”

  • order (int) – Passed through to warp for the translation, default 3

  • add_metadata – If True, add the translation as metadata to the image.

  • cval (float) – The value to fill with if mode is constant. If not specified or None, defaults to the mean pixcel value.

Returns:

im (ImageArray) – translated image

Areas lost by move are cropped, and areas gained are made black (0) The area not lost or cropped is added as a metadata parameter ‘translation_limits’