Skip to content

Commit

Permalink
added init_mmlut to the full correspondence test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlib committed Dec 17, 2023
1 parent be191e1 commit b822300
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -480,3 +480,4 @@ tests/testing_fodder/track/newpart/*
tests/testing_fodder/burgers/*
tests/testing_fodder/test_0042_targets
tests/testing_folder/round_trip.%04d0001_targets
*.prof
6 changes: 3 additions & 3 deletions openptv_python/multimed.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ def multimed_r_nlay(cal: Calibration, mm: MultimediaPar, pos: np.ndarray) -> flo

# interpolation using the existing mmlut
if cal.mmlut.data is not None:
print("going into get_mmf_from_mmlut\n")
# print("going into get_mmf_from_mmlut\n")
mmf = get_mmf_from_mmlut(cal, pos)
if mmf > 0:
print(f"mmf from data = {mmf}")
# print(f"mmf from data = {mmf}")
return mmf

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

return mmf

Expand Down
4 changes: 4 additions & 0 deletions tests/test_corresp.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
)
from openptv_python.epi import Coord2d
from openptv_python.imgcoord import img_coord
from openptv_python.multimed import init_mmlut
from openptv_python.parameters import ControlPar, read_control_par, read_volume_par
from openptv_python.tracking_frame_buf import (
Frame,
Expand Down Expand Up @@ -192,6 +193,9 @@ def test_full_corresp(self):
# print(f" con = {con[0]}")
# assert match_counts == [16, 0, 0, 16]

for cal in calib:
cal = init_mmlut(vpar, cpar, cal)

sorted_pos, sorted_corresp, num_targs = py_correspondences(
frm.targets, corrected, calib, vpar, cpar
)
Expand Down

0 comments on commit b822300

Please sign in to comment.