Skip to content

Commit

Permalink
Probably fix pylints
Browse files Browse the repository at this point in the history
  • Loading branch information
Filip Jeretina committed Sep 26, 2024
1 parent bf2af82 commit 8cc61c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rerun_py/depthai_viewer/_backend/packet_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ def get_intrinsic_matrix(self, board_socket: dai.CameraBoardSocket, width: int,

def get_distortion_coefficients(self, board_socket: dai.CameraBoardSocket) -> NDArray[np.float32]:
if self.distortion_coefficients.get(board_socket) is not None:
return self.distortion_coefficients.get(board_socket)
return self.distortion_coefficients.get(board_socket) # # type: ignore[return-value]
try:
D = self.calibration_handler.getDistortionCoefficients(board_socket) # type: ignore[union-attr]
except RuntimeError:
print("No distortion coefficients found for camera: ", board_socket, " assuming default.")
D = np.array([0, 0, 0, 0, 0])
D = np.array([0.0, 0.0, 0.0, 0.0, 0.0])
self.distortion_coefficients[board_socket] = np.array(D)
return self.distortion_coefficients[board_socket]

Expand Down

0 comments on commit 8cc61c4

Please sign in to comment.