finish task_gen

This commit is contained in:
2025-09-05 11:10:42 +08:00
parent da022d4f83
commit 4e51158215
17 changed files with 82 additions and 50 deletions

View File

@@ -0,0 +1,12 @@
import numpy as np
from numpy import ndarray
def transform_coordinates_3d(coordinates: ndarray, sRT: ndarray):
assert coordinates.shape[0] == 3
coordinates = np.vstack(
[coordinates, np.ones((1, coordinates.shape[1]), dtype=np.float32)]
)
new_coordinates = sRT @ coordinates
new_coordinates = new_coordinates[:3, :] / new_coordinates[3, :]
return new_coordinates