Renamed project.
This commit is contained in:
@ -5,7 +5,7 @@ import time
|
||||
import numpy as np
|
||||
|
||||
sys.path.append("../swig/")
|
||||
import spt
|
||||
import rpt
|
||||
|
||||
# ==================================================================================================
|
||||
|
||||
@ -14,7 +14,7 @@ def main():
|
||||
print("")
|
||||
|
||||
# Test camera structure
|
||||
camera = spt.Camera()
|
||||
camera = rpt.Camera()
|
||||
camera.name = "Camera 1"
|
||||
camera.K = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
|
||||
camera.DC = [0, 0, 0, 0, 0]
|
||||
@ -49,18 +49,18 @@ def main():
|
||||
"shoulder_middle",
|
||||
"head",
|
||||
]
|
||||
cpath = "/SimplePoseTriangulation/data/h1/sample.json"
|
||||
ppath = "/SimplePoseTriangulation/tests/poses_h1.json"
|
||||
cpath = "/RapidPoseTriangulation/data/h1/sample.json"
|
||||
ppath = "/RapidPoseTriangulation/tests/poses_h1.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)
|
||||
cameras = rpt.convert_cameras(cams)
|
||||
|
||||
# Run triangulation
|
||||
triangulator = spt.Triangulator(min_score=0.95)
|
||||
triangulator = rpt.Triangulator(min_score=0.95)
|
||||
stime = time.time()
|
||||
poses_3d = triangulator.triangulate_poses(
|
||||
poses_2d, cameras, roomparams, joint_names
|
||||
@ -71,15 +71,15 @@ def main():
|
||||
|
||||
# Load input data
|
||||
roomparams = [[5.6, 6.4, 2.4], [0, -0.5, 1.2]]
|
||||
cpath = "/SimplePoseTriangulation/data/p1/sample.json"
|
||||
ppath = "/SimplePoseTriangulation/tests/poses_p1.json"
|
||||
cpath = "/RapidPoseTriangulation/data/p1/sample.json"
|
||||
ppath = "/RapidPoseTriangulation/tests/poses_p1.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)
|
||||
cameras = rpt.convert_cameras(cams)
|
||||
|
||||
# Run triangulation
|
||||
triangulator.reset()
|
||||
@ -102,15 +102,15 @@ def main():
|
||||
|
||||
# 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"
|
||||
cpath = "/RapidPoseTriangulation/data/e1/sample.json"
|
||||
ppath = "/RapidPoseTriangulation/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)
|
||||
cameras = rpt.convert_cameras(cams)
|
||||
|
||||
# Run triangulation
|
||||
triangulator.reset()
|
||||
|
||||
Reference in New Issue
Block a user