Implemented fisheye camera triangulation.
This commit is contained in:
@ -100,6 +100,28 @@ def main():
|
||||
print(np.array(poses_3d))
|
||||
print("")
|
||||
|
||||
# Load input data
|
||||
roomparams = [[6.0, 5.0, 2.0], [1.5, 1.0, -0.5]]
|
||||
cpath = "/SimplePoseTriangulation/data/e1/sample.json"
|
||||
ppath = "/SimplePoseTriangulation/tests/poses_e1.json"
|
||||
with open(cpath, "r") as file:
|
||||
cdata = json.load(file)
|
||||
with open(ppath, "r") as file:
|
||||
pdata = json.load(file)
|
||||
cams = cdata["cameras"]
|
||||
poses_2d = pdata["2D"]
|
||||
cameras = spt.convert_cameras(cams)
|
||||
|
||||
# Run triangulation
|
||||
triangulator.reset()
|
||||
stime = time.time()
|
||||
poses_3d = triangulator.triangulate_poses(
|
||||
poses_2d, cameras, roomparams, joint_names
|
||||
)
|
||||
print("3D time:", time.time() - stime)
|
||||
print(np.array(poses_3d))
|
||||
print("")
|
||||
|
||||
triangulator.print_stats()
|
||||
print("")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user