pycvcam.FisheyeDistortion._inverse_transform#
- FisheyeDistortion._inverse_transform(distorted_points, *, dx=False, dp=False, **kwargs)[source]#
Compute the inverse transformation from the
distorted_pointsto thenormalized_points.Lets consider
distorted_pointsin the camera normalized coordinate system \(\vec{x}_d = (x_d, y_d)\), the correspondingnormalized_pointsin the camera normalized coordinate system are obtained by aniterativealgorithm that finds the points \(\vec{x}_n\).See also
pycvcam.optimize_input_points_gn()for the implementation of the iterative algorithm to find the inverse distortion points.
The initial guess is setted to \(\vec{x}_{n} = \vec{x}_{d} - U(\vec{x}_{d})`\), where \(U(\vec{x}_{d})\) is the distortion field applied to the distorted points.
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 inputimage_pointsis (n_points, 2) before calling this method.The jacobians with respect to the distortion parameters and the distorted points are always None, since it is an iterative algorithm.
- 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
**kwargs (dict, optional) – Additional keyword arguments to pass to the iterative algorithm.
- 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: