kornia.geometry.calibration

Module with useful functionalities for camera calibration.

kornia.geometry.calibration.undistort_points(points, K, dist)[source]

Compensate for lens distortion a set of 2D image points.

Radial \((k_1, k_2, k_3, k_4, k_4, k_6)\), tangential \((p_1, p_2)\), thin prism \((s_1, s_2, s_3, s_4)\), and tilt \((\tau_x, \tau_y)\) distortion models are considered in this function.

Parameters
  • points (Tensor) – Input image points with shape \((*, N, 2)\).

  • K (Tensor) – Intrinsic camera matrix with shape \((*, 3, 3)\).

  • dist (Tensor) – Distortion coefficients \((k_1,k_2,p_1,p_2[,k_3[,k_4,k_5,k_6[,s_1,s_2,s_3,s_4[,\tau_x,\tau_y]]]])\). This is a vector with 4, 5, 8, 12 or 14 elements with shape \((*, n)\)

Return type

Tensor

Returns

Undistorted 2D points with shape \((*, N, 2)\).