def _compute_scaling_matrix(scale: torch.Tensor, center: torch.Tensor) -> torch.Tensor: """Computes affine matrix for scaling.""" angle: torch.Tensor = torch.zeros(scale.shape[:1], device=scale.device, dtype=scale.dtype) matrix: torch.Tensor = get_rotation_matrix2d(center, angle, scale) return matrix
def _compute_rotation_matrix(angle: torch.Tensor, center: torch.Tensor) -> torch.Tensor: """Computes a pure affine rotation matrix.""" scale: torch.Tensor = torch.ones_like(center) matrix: torch.Tensor = get_rotation_matrix2d(center, angle, scale) return matrix
def _compute_scaling_matrix(scale: torch.Tensor, center: torch.Tensor) -> torch.Tensor: """Computes affine matrix for scaling.""" angle: torch.Tensor = torch.zeros_like(scale) matrix: torch.Tensor = get_rotation_matrix2d(center, angle, scale) return matrix