HomogeneousTransformation
- class HomogeneousTransformation(matrix: ndarray[4, 4])
A
HomogeneousTransformationis a 4x4 matrix-based transformation that that can encode a change of basis, translation, and projective warp.It gets applied to vectors
v = (x, y, z)by converting them to a homogeneous vectorh = (x, y, z, 1), computingh' = M * h, and returningv' = h'[:-1] / h'[-1].- Parameters:
matrix – The 4x4 homogeneous matrix
Mof this transformation.
Methods
Apply this
HomogeneousTransformationto a vector.Compute all
HomogeneousTransformationtransformations that might embedqueryintarget.The inverse
HomogeneousTransformationof this one.- __matmul__(other: Transformation) Transformation
Composes this transformation with another, applying the other first.
- apply(vector: ndarray[3]) ndarray[3]
Apply this
HomogeneousTransformationto a vector.
- classmethod compute(query: Shape, target: Shape, parameters: ShapeQueryParameters = ShapeQueryParameters(direct=True, indirect=True, indet_scale=1.0, indet_angle=0.0, indet_fit_max=False, indet_fit_uniform_scale=True)) List[HomogeneousTransformation]
Compute all
HomogeneousTransformationtransformations that might embedqueryintarget.- Parameters:
query – The shape to embed in
target.target – The shape to embed
queryin.parameters – The parameters used to calculate the transformations.
- Returns:
The list of all transformations
tsuch thatt @ query <= targetandisinstance(t, HomogeneousTransformation).
- inverse()
The inverse
HomogeneousTransformationof this one.