batch_create_matrices

lib.align.aligned_utils.batch_create_matrices(size: int, rotation: npt.NDArray[np.float32], scale: npt.NDArray[np.float32] | None = None, translation: npt.NDArray[np.float32] | None = None) npt.NDArray[np.float32]

Generate affine transformation matrices for the given rotations, scales and translations

Parameters:
  • size (int) – The size of the image that the matrix is transforming to

  • rotation (npt.NDArray[np.float32]) – A 1D batch of rotation amounts or None for no rotation. Default: None

  • scale (npt.NDArray[np.float32] | None) – A 1D batch of scale amounts or None for no scaling. Default: None

  • translation (npt.NDArray[np.float32] | None) – A 2D batch of (x, y) translation amounts or None for no translation. Default: None

Return type:

The (3, 3) transformation matrices for the requested transform