|
27 | 27 | import numpy as np |
28 | 28 | from scipy.optimize import least_squares |
29 | 29 |
|
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 |
32 | 31 | from .parameter_manager import ParameterManager |
33 | 32 | from . import ptv |
34 | 33 |
|
@@ -176,8 +175,6 @@ def run_dumbbell_calibration( |
176 | 175 | cpar=cpar, |
177 | 176 | ) |
178 | 177 | if db_eps > 0: |
179 | | - from openptv_python.orientation import multi_cam_point_positions |
180 | | - |
181 | 178 | num_frames = int(n_used) |
182 | 179 | per_frame = all_targs_metric.reshape(num_cams, num_frames, 2, 2) |
183 | 180 | keep = np.ones(num_frames, dtype=bool) |
@@ -205,9 +202,6 @@ def run_dumbbell_calibration( |
205 | 202 | print(f"Using {n_used} frame(s) for dumbbell calibration (of {n_total})") |
206 | 203 |
|
207 | 204 | 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 | | - |
211 | 205 | num_cams_local, num_frames_local, num_targs_local, _ = metric_targets.shape |
212 | 206 | sums = np.zeros(num_cams_local, dtype=float) |
213 | 207 | counts = np.zeros(num_cams_local, dtype=int) |
@@ -262,8 +256,6 @@ def _print_camera_residuals(label: str, metric_targets: np.ndarray) -> None: |
262 | 256 | ptr += 1 |
263 | 257 |
|
264 | 258 | def _init_dumbbell_points(metric_targets: np.ndarray) -> np.ndarray: |
265 | | - from openptv_python.orientation import multi_cam_point_positions |
266 | | - |
267 | 259 | num_cams_local, num_frames_local, _, _ = metric_targets.shape |
268 | 260 | points = np.zeros((num_frames_local, 2, 3), dtype=float) |
269 | 261 |
|
|
0 commit comments