Skip to content

Commit

Permalink
Update camera comments
Browse files Browse the repository at this point in the history
  • Loading branch information
luigifreda committed Dec 31, 2020
1 parent be4097f commit ad41828
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def init(self):
# project a 3D point or an array of 3D points (w.r.t. camera frame), of shape [Nx3]
# out: Nx2 image points, [Nx1] array of map point depths
def project(self, xcs):
#u = self.fx * xc[0]/xc[0] + self.cx
#v = self.fy * xc[1]/xc[0] + self.cy
#u = self.fx * xc[0]/xc[2] + self.cx
#v = self.fy * xc[1]/xc[2] + self.cy
projs = self.K @ xcs.T
zs = projs[-1]
projs = projs[:2]/ zs
Expand Down Expand Up @@ -121,4 +121,4 @@ def is_in_image(self, uv, z):
def are_in_image(self, uvs, zs):
return (uvs[:, 0] > self.u_min) & (uvs[:, 0] < self.u_max) & \
(uvs[:, 1] > self.v_min) & (uvs[:, 1] < self.v_max) & \
(zs > 0 )
(zs > 0 )

0 comments on commit ad41828

Please sign in to comment.