pysdic.DistortionResult#

class DistortionResult(x, jacobian_dx=None, jacobian_dp=None, n_intrinsic=0, n_distortion=0, n_rectification=0, n_projection=0)[source]#

A class to represent the result of the distortion or undistortion of 2D image points.

It extends pysdic.TransformationResult with the number of parameters of each step, to give access to the blocks of the Jacobian with respect to the parameters of the intrinsic, distortion, rectification \(R\) and projection \(P\) transformations.

The parameters are ordered as the steps are applied:

jacobian_dp[..., :N_i]                           # intrinsic parameters
jacobian_dp[..., N_i:N_i + N_d]                  # distortion parameters
jacobian_dp[..., N_i + N_d:N_i + N_d + N_R]      # rectification parameters
jacobian_dp[..., N_i + N_d + N_R:]               # projection parameters

See also

Parameters:
  • x (numpy.ndarray) – The output points. Shape \((\dots, 2)\).

  • jacobian_dx (Optional[numpy.ndarray]) – The Jacobian of the output points with respect to the image points, or None if not computed. Shape \((\dots, 2, 2)\).

  • jacobian_dp (Optional[numpy.ndarray]) – The Jacobian of the output points with respect to the parameters of all the steps, or None if not computed. Shape \((\dots, 2, N_i + N_d + N_R + N_P)\).

  • n_intrinsic (int) – The number of parameters \(N_i\) of the intrinsic transformation.

  • n_distortion (int) – The number of parameters \(N_d\) of the distortion transformation.

  • n_rectification (int) – The number of parameters \(N_R\) of the rectification transformation \(R\).

  • n_projection (int) – The number of parameters \(N_P\) of the projection transformation \(P\).

property jacobian_ddistortion: ndarray | None#

[Get] the Jacobian of the output points with respect to the distortion parameters, as a view of jacobian_dp[..., N_i:N_i + N_d]. Shape \((\dots, 2, N_d)\).

Returns:

The Jacobian with respect to the distortion parameters, or None if not computed.

Return type:

Optional[numpy.ndarray]

property jacobian_dintrinsic: ndarray | None#

[Get] the Jacobian of the output points with respect to the intrinsic parameters, as a view of jacobian_dp[..., :N_i]. Shape \((\dots, 2, N_i)\).

Returns:

The Jacobian with respect to the intrinsic parameters, or None if not computed.

Return type:

Optional[numpy.ndarray]

property jacobian_dprojection: ndarray | None#

[Get] the Jacobian of the output points with respect to the projection parameters, as a view of jacobian_dp[..., N_i + N_d + N_R:]. Shape \((\dots, 2, N_P)\).

Returns:

The Jacobian with respect to the projection parameters, or None if not computed.

Return type:

Optional[numpy.ndarray]

property jacobian_drectification: ndarray | None#

[Get] the Jacobian of the output points with respect to the rectification parameters, as a view of jacobian_dp[..., N_i + N_d:N_i + N_d + N_R]. Shape \((\dots, 2, N_R)\).

Returns:

The Jacobian with respect to the rectification parameters, or None if not computed.

Return type:

Optional[numpy.ndarray]