Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pymvg/multi_camera_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ def to_dict(self):

def find3d(self,pts,undistort=True):
"""Find 3D coordinate using all data given

In:
pts: list(tuple(name, xy)), where xy is np.array([[x, y]]) is
the list of pixel coordinates to triangulate
undistort: bool, if True use pymvg _undistort

Implements a linear triangulation method to find a 3D
point. For example, see Hartley & Zisserman section 12.2
Expand All @@ -212,7 +217,7 @@ def find3d(self,pts,undistort=True):
for name,xy in pts:
cam = self._cameras[name]
if undistort:
xy = cam.undistort( [xy] )
xy = cam.undistort(xy)
Pmat = cam.get_M() # Pmat is 3 rows x 4 columns
row2 = Pmat[2,:]
x,y = xy[0,:]
Expand Down