Skip to content

Commit

Permalink
typing: revert previous change, add type: ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasNeugebauer committed Feb 6, 2025
1 parent 6001245 commit b8de09c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rosys/vision/calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def distort_points(self, image_points: np.ndarray, crop: bool = False) -> np.nda
return self._distort_points_pinhole(image_points)
elif self.intrinsics.model == CameraModel.FISHEYE:
new_K = self.get_undistorted_camera_matrix(crop=crop)
normalized_points = cv2.undistortPoints(image_points, new_K, [])
normalized_points = cv2.undistortPoints(image_points, new_K, None) # type: ignore
return cv2.fisheye.distortPoints(normalized_points, K, D)
elif self.intrinsics.model == CameraModel.OMNIDIRECTIONAL:
raise NotImplementedError('Re-distortion for omnidirectional cameras is not supported')
Expand All @@ -329,7 +329,7 @@ def _distort_points_pinhole(self, image_points: np.ndarray) -> np.ndarray:
# Note: this is a slight hack of available functions.
# We first normalize the points, then project them
# In the end this applies only the distortion during projectPoints
normalized_points = cv2.undistortPoints(image_points, new_K, [])
normalized_points = cv2.undistortPoints(image_points, new_K, None) # type: ignore
points_3d = cv2.convertPointsToHomogeneous(normalized_points)
distorted_points, _ = cv2.projectPoints(points_3d, np.zeros(3), np.zeros(3), K, D)
return distorted_points
Expand Down

0 comments on commit b8de09c

Please sign in to comment.