pycvcam.Cv2Intrinsic._inverse_transform#
- Cv2Intrinsic._inverse_transform(image_points, *, dx=False, dp=False)[source]#
Compute the inverse transformation from the
image_pointsto thedistorted_points.Lets consider
image_pointsin the image coordinate system \(\vec{x}_i = (x_i, y_i)\), the correspondingdistorted_pointsin the camera normalized coordinate system are given by :\[x_d = \frac{x_i - c_x}{f_x}\]\[y_d = \frac{y_i - c_y}{f_y}\]The jacobians with respect to the intrinsic parameters is an array with shape (n_points, 2, 4), where the last dimension represents the parameters (fx, fy, cx, cy). The jacobian with respect to the image points is an array with shape (n_points, 2, 2).
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.- Parameters:
image_points (numpy.ndarray) – The image points in image coordinates to be transformed. Shape (n_points, 2).
dx (bool, optional) – If True, the jacobian with respect to the image points is computed. Default is False
dp (bool, optional) – If True, the jacobian with respect to the intrinsic parameters is computed. Default is False
- Returns:
distorted_points (numpy.ndarray) – The distorted 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]) – The jacobian of the distorted points with respect to the image points. Shape (n_points, 2, 2) if dx is True, otherwise None.
jacobian_dp (Optional[numpy.ndarray]) – The jacobian of the distorted points with respect to the intrinsic parameters. Shape (n_points, 2, 4) if dp is True, otherwise None.
- Return type: