pycvcam.SkewIntrinsic._transform#
- SkewIntrinsic._transform(distorted_points, *, dx=False, dp=False)[source]#
Compute the transformation from the
distorted_pointsto theimage_points.Lets consider
distorted_pointsin the camera normalized coordinate system \(\vec{x}_d = (x_d, y_d)\), the correspondingimage_pointsin the image coordinate system are given by :The equation used for the intrinsic transformation is:
\[x_i = f_x \cdot x_d + s \cdot y_d + c_x\]\[y_i = f_y \cdot y_d + c_y\]The jacobians with respect to the intrinsic parameters is an array with shape (n_points, 2, 5), where the last dimension represents the parameters (fx, fy, cx, cy, s). The jacobian with respect to the distorted 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 inputdistorted_pointsis (n_points, 2) before calling this method.- 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 intrinsic parameters is computed. Default is False
- Returns:
image_points (numpy.ndarray) – The image points in image coordinates, which are equal to the x and y componants of the distorted points. Shape (n_points, 2).
jacobian_dx (Optional[numpy.ndarray]) – The jacobian of the image points with respect to the distorted points. Shape (n_points, 2, 2) if dx is True, otherwise None.
jacobian_dp (Optional[numpy.ndarray]) – The jacobian of the image points with respect to the intrinsic parameters. Shape (n_points, 2, 5) if dp is True, otherwise None.
- Return type: