Skip to content

Commit 4998562

Browse files
committed
most tests pass
1 parent a8d297c commit 4998562

2 files changed

Lines changed: 2 additions & 14 deletions

File tree

src/pyptv/dumbbell_ground_truth.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@
1515

1616
import numpy as np
1717

18-
from openptv_python.calibration import Calibration
19-
from openptv_python.imgcoord import image_coordinates
20-
from openptv_python.tracking_frame_buf import TargetArray
21-
from openptv_python.trafo import arr_metric_to_pixel as convert_arr_metric_to_pixel
22-
18+
from ._backend import Calibration, TargetArray, convert_arr_metric_to_pixel, image_coordinates
2319
from .parameter_manager import ParameterManager
2420
from . import ptv
2521

src/pyptv/standalone_dumbbell_calibration.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
import numpy as np
2828
from scipy.optimize import least_squares
2929

30-
from openptv_python.trafo import arr_pixel_to_metric as convert_arr_pixel_to_metric
31-
30+
from ._backend import convert_arr_pixel_to_metric, image_coordinates, multi_cam_point_positions
3231
from .parameter_manager import ParameterManager
3332
from . import ptv
3433

@@ -176,8 +175,6 @@ def run_dumbbell_calibration(
176175
cpar=cpar,
177176
)
178177
if db_eps > 0:
179-
from openptv_python.orientation import multi_cam_point_positions
180-
181178
num_frames = int(n_used)
182179
per_frame = all_targs_metric.reshape(num_cams, num_frames, 2, 2)
183180
keep = np.ones(num_frames, dtype=bool)
@@ -205,9 +202,6 @@ def run_dumbbell_calibration(
205202
print(f"Using {n_used} frame(s) for dumbbell calibration (of {n_total})")
206203

207204
def _print_camera_residuals(label: str, metric_targets: np.ndarray) -> None:
208-
from openptv_python.imgcoord import image_coordinates
209-
from openptv_python.orientation import multi_cam_point_positions
210-
211205
num_cams_local, num_frames_local, num_targs_local, _ = metric_targets.shape
212206
sums = np.zeros(num_cams_local, dtype=float)
213207
counts = np.zeros(num_cams_local, dtype=int)
@@ -262,8 +256,6 @@ def _print_camera_residuals(label: str, metric_targets: np.ndarray) -> None:
262256
ptr += 1
263257

264258
def _init_dumbbell_points(metric_targets: np.ndarray) -> np.ndarray:
265-
from openptv_python.orientation import multi_cam_point_positions
266-
267259
num_cams_local, num_frames_local, _, _ = metric_targets.shape
268260
points = np.zeros((num_frames_local, 2, 3), dtype=float)
269261

0 commit comments

Comments
 (0)