pycvcam.Cv2Distortion._inverse_transform_opencv#

Cv2Distortion._inverse_transform_opencv(distorted_points, *, dx=False, dp=False)[source]#

Compute the inverse transformation from the distorted_points to the normalized_points using OpenCV’s undistortPoints function.

The equation used for the transformation is given in the main documentation of the class.

Warning

This method is not intended to be used directly, but rather through the pycvcam.core.Transform.transform() method. Please ensure, the shape of the input distorted_points is (n_points, 2) with float type.

The jacobian with respect to the distorted points and the distortion parameters is not computed in this case (always None).

Parameters:
  • distorted_points (numpy.ndarray) – The distorted points in camera normalized coordinates to be transformed. Shape (n_points, 2).

  • dx (bool, optional) – If True, the jacobian with respect to the distorted points is computed. Default is False

  • dp (bool, optional) – If True, the jacobian with respect to the distortion parameters is computed. Default is False

Returns:

  • normalized_points (numpy.ndarray) – The normalized points in camera normalized coordinates, which are equal to the x and y components of the image points. Shape (n_points, 2).

  • jacobian_dx (Optional[numpy.ndarray]) – Always None, since the jacobian with respect to the distorted points is not computed by an iterative algorithm.

  • jacobian_dp (Optional[numpy.ndarray]) – Always None, since the jacobian with respect to the distortion parameters is not computed by an iterative algorithm.

Return type:

Tuple[ndarray, ndarray | None, ndarray | None]