Skip to content

Commit

Permalink
matching set up with camera wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
ronshnapp committed Jan 13, 2024
1 parent 4d99b09 commit 42e0777
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
November 23, 2023
Version: 0.8.0
Version: 1.0.0

<img src="./user_manual/figs/logo.png" style="zoom:20%;" />

Expand Down
2 changes: 1 addition & 1 deletion example/params_file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
march_backwards: True
camera_names: cam1, cam2, cam3
ROI: 0.0, 70.0, 0.0, 70.0, -25.0, 15.0
voxel_size: 10
voxel_size: 20
N0: 100
max_err: 0.25
min_cam_match: 3
Expand Down
13 changes: 8 additions & 5 deletions myptv/particle_matching_mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def find_candidates_with_two_cameras(self, camNum1, camNum2, frame):
'''
# fetching the cameras and the blobs
cam1 = self.imsys.cameras[camNum1] ; cam2 = self.imsys.cameras[camNum2]
O1 = cam1.O ; O2 = cam2.O
# O1 = cam1.O ; O2 = cam2.O
blobs1 = self.blobs[camNum1][frame]
blobs2 = self.blobs[camNum2][frame]

Expand Down Expand Up @@ -355,7 +355,8 @@ def find_candidates_with_two_cameras(self, camNum1, camNum2, frame):
if identifier in self.matchedBlobs[frame]: # this blob has been used
continue

r = cam2.get_r(b[0], b[1])
#r = cam2.get_r(b[0], b[1])
O2, r = cam2.get_epipolarline(b[0], b[1])
a_center = sum([r[i]*(O_ROI[i]-O2[i]) for i in range(3)])
a1, a2 = a_center - a_range/2 , a_center + a_range/2

Expand Down Expand Up @@ -388,7 +389,8 @@ def find_candidates_with_two_cameras(self, camNum1, camNum2, frame):
if identifier in self.matchedBlobs[frame]: # this blob has been used
continue

r = cam1.get_r(b[0], b[1])
# r = cam1.get_r(b[0], b[1])
O1, r = cam1.get_epipolarline(b[0], b[1])
a_center = sum([r[i]*(O_ROI[i]-O1[i]) for i in range(3)])
a1, a2 = a_center - a_range/2 , a_center + a_range/2

Expand Down Expand Up @@ -927,8 +929,9 @@ def ray_traversed_voxels(self, ray):
return

cam = self.imsys.cameras[ray[2][0]]
O = cam.O
r = cam.get_r(ray[0], ray[1])
# O = cam.O
# r = cam.get_r(ray[0], ray[1])
O, r = cam.get_epipolarline(ray[0], ray[1])
r_ = r / sum(r**2)**0.5

a1, a2 = (self.RIO[2][0] - O[2])/r_[2], (self.RIO[2][1] - O[2])/r_[2]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
setup(
name='myptv',
packages=find_packages(include=['myptv', 'myptv.fibers', 'myptv.TsaiModel']),
version='0.8.0',
version='1.0.0',
description='A 3D Particle Tracking Velocimetry library',
install_requires=['numpy', 'scipy', 'scikit-image','pandas','matplotlib','pyyaml', 'tk', 'Pillow'],
author='Ron Shnapp',
Expand Down

0 comments on commit 42e0777

Please sign in to comment.