HomogeneousTransformation
- class HomogeneousTransformation(matrix: ndarray[4, 4])
A
HomogeneousTransformation
is 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
M
of this transformation.
Methods
Apply this
HomogeneousTransformation
to a vector.Compute all
HomogeneousTransformation
transformations that might embedquery
intarget
.The inverse
HomogeneousTransformation
of this one.- __matmul__(other: Transformation) Transformation
Composes this transformation with another, applying the other first.
- apply(vector: ndarray[3]) ndarray[3]
Apply this
HomogeneousTransformation
to 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
HomogeneousTransformation
transformations that might embedquery
intarget
.- Parameters:
query – The shape to embed in
target
.target – The shape to embed
query
in.parameters – The parameters used to calculate the transformations.
- Returns:
The list of all transformations
t
such thatt @ query <= target
andisinstance(t, HomogeneousTransformation)
.
- inverse()
The inverse
HomogeneousTransformation
of this one.