pysdic.NoExtrinsic#
NoExtrinsic class#
- class NoExtrinsic(*args, **kwargs)[source]#
Bases:
IdentityTransformationSubclass of
pysdic.IdentityTransformationthat represents a no-extrinsic transformation (no rotation and no translation).This can be used as a default or placeholder extrinsic transformation when no rotation or translation is present in the camera model. The world points are already expressed in the camera coordinate system:
With 3D world points (
input_dim=3, default), the normalized points are the first two coordinates of the world points (orthographic projection with an identity pose):\[\vec{x}_n = (X_w, Y_w)\]As for
pysdic.OrthographicExtrinsic, the inverse transformation needs the depth of the points: \(\vec{X}_w = (x_n, y_n, Z_c)\), given by thedepthargument ofinvert(default 1.0). It is a right inverse but not a left inverse.With 2D world points (
input_dim=2), the transformation is the identity of the plane:\[\vec{x}_n = \vec{x}_w\]
See also
Class
pysdic.IdentityTransformationfor the identity transformation.Class
pysdic.OrthographicExtrinsicfor the orthographic extrinsic with any pose.
- Parameters:
input_dim (Integral, optional (default:
3)) – The dimension of the world points, 3 (3D world points) or 2 (planar world points).
Examples
extrinsic = NoExtrinsic() extrinsic.apply([[1.0, 2.0, 5.0]]).x # array([[1., 2.]]) extrinsic.invert([[1.0, 2.0]], depth=5.0).x # array([[1., 2., 5.]]) planar = NoExtrinsic(input_dim=2) planar.apply([[1.0, 2.0]]).x # array([[1., 2.]])
Instantiation#
The NoExtrinsic class is instantiated directly with its constructor:
With 3D world points (default):
NoExtrinsic()orNoExtrinsic(input_dim=3).With planar world points:
NoExtrinsic(input_dim=2).
Implemented methods and attributes#
The following sections provide an overview of the attributes and methods defined
in the pysdic.NoExtrinsic class.
Attributes#
The pysdic.NoExtrinsic has no parameters: parameters is an empty vector.
The dimension of the world points is given by the input_dim attribute of the base class
pysdic.Transformation (2 or 3).
Performing Projections#
Use the apply and invert methods from
pysdic.Transformation to perform extrinsic projections:
apply: mapsworld_points→normalized_points.invert: mapsnormalized_points→world_points(at the depth given by thedepthargument for 3D world points).compute_rays: mapsnormalized_points→rays(origins and unit directions in world coordinates, only for 3D world points).
Jacobians with respect to the input points and extrinsic parameters
can be computed by enabling the dx and dp flags:
dx=True: compute ∂normalized_points / ∂world_pointsdp=True: compute ∂normalized_points / ∂extrinsic_parameters (empty)
|
Apply the identity transformation from \(\mathbb{R}^{n_i}\) to \(\mathbb{R}^{n_o}\). |
|
Compute the inverse transformation from 2D normalized points to world points. |
|
Compute the rays of the camera passing through the given normalized points (only for 3D world points). |