Skip to content

Commit

Permalink
Update for compatibility with image_pipeline 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottMonaghan committed Apr 23, 2024
1 parent 30b982a commit bfdd7ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions camera_calibration/src/camera_calibration/calibrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1317,9 +1317,9 @@ def chessboard_size(self, lcorners, rcorners, board, msg = None):
cam = image_geometry.StereoCameraModel()
if msg == None:
msg = self.as_message()
cam.fromCameraInfo(*msg)
cam.from_camera_info(*msg)
disparities = lcorners[:,:,0] - rcorners[:,:,0]
pt3d = [cam.projectPixelTo3d((lcorners[i,0,0], lcorners[i,0,1]), disparities[i,0]) for i in range(lcorners.shape[0]) ]
pt3d = [cam.project_pixel_to_3d((lcorners[i,0,0], lcorners[i,0,1]), disparities[i,0]) for i in range(lcorners.shape[0]) ]
def l2(p0, p1):
return math.sqrt(sum([(c0 - c1) ** 2 for (c0, c1) in zip(p0, p1)]))

Expand Down

0 comments on commit bfdd7ac

Please sign in to comment.