Skip to content

Commit b822300

Browse files
committed
added init_mmlut to the full correspondence test
1 parent be191e1 commit b822300

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,3 +480,4 @@ tests/testing_fodder/track/newpart/*
480480
tests/testing_fodder/burgers/*
481481
tests/testing_fodder/test_0042_targets
482482
tests/testing_folder/round_trip.%04d0001_targets
483+
*.prof

openptv_python/multimed.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ def multimed_r_nlay(cal: Calibration, mm: MultimediaPar, pos: np.ndarray) -> flo
3636

3737
# interpolation using the existing mmlut
3838
if cal.mmlut.data is not None:
39-
print("going into get_mmf_from_mmlut\n")
39+
# print("going into get_mmf_from_mmlut\n")
4040
mmf = get_mmf_from_mmlut(cal, pos)
4141
if mmf > 0:
42-
print(f"mmf from data = {mmf}")
42+
# print(f"mmf from data = {mmf}")
4343
return mmf
4444

4545
mmf = fast_multimed_r_nlay(
@@ -52,7 +52,7 @@ def multimed_r_nlay(cal: Calibration, mm: MultimediaPar, pos: np.ndarray) -> flo
5252
cal.ext_par.y0,
5353
cal.ext_par.z0,
5454
pos)
55-
print(f"mmf from a loop = {mmf}")
55+
# print(f"mmf from a loop = {mmf}")
5656

5757
return mmf
5858

tests/test_corresp.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
)
1818
from openptv_python.epi import Coord2d
1919
from openptv_python.imgcoord import img_coord
20+
from openptv_python.multimed import init_mmlut
2021
from openptv_python.parameters import ControlPar, read_control_par, read_volume_par
2122
from openptv_python.tracking_frame_buf import (
2223
Frame,
@@ -192,6 +193,9 @@ def test_full_corresp(self):
192193
# print(f" con = {con[0]}")
193194
# assert match_counts == [16, 0, 0, 16]
194195

196+
for cal in calib:
197+
cal = init_mmlut(vpar, cpar, cal)
198+
195199
sorted_pos, sorted_corresp, num_targs = py_correspondences(
196200
frm.targets, corrected, calib, vpar, cpar
197201
)

0 commit comments

Comments
 (0)