batch_adjust_matrices
- lib.align.aligned_utils.batch_adjust_matrices(matrices: npt.NDArray[np.float32], size: int, padding: int, reverse: bool = False) npt.NDArray[np.float32]
Adjust a batch of normalized (0, 1) matrices to the given size and padding, or the reverse
- Parameters:
matrices (npt.NDArray[np.float32]) – The (N, 3, 3) or (N, 2, 3) matrices to adjust
size (int) – The size to adjust the matrices to
padding (int) – The padding to apply to each side of the adjusted matrices
reverse (bool) –
Trueto adjust normalized matrices to the given size.Falseto adjust the given sized matrices to normalized matrices. Default:False
- Returns:
The adjusted matrices to the given size and padding if reverse is
Falseor the normalizedmatrix if reverse is
True
- Return type:
npt.NDArray[np.float32]