transform_image

lib.align.aligned_utils.transform_image(image: ndarray, matrix: ndarray, size: int, padding: int = 0) ndarray

Perform transformation on an image, applying the given size and padding to the matrix.

Parameters:
  • image (ndarray) – The image to transform

  • matrix (ndarray) – The transformation matrix to apply to the image

  • size (int) – The final size of the transformed image

  • padding (int) – The amount of padding to apply to the final image. Default: 0

Return type:

The transformed image