The Octave Forge package repository is no longer actively maintained. Please find Octave Packages at https://packages.octave.org.

Navigation

Operators and Keywords

Function List:

C++ API

Function File: tform = affine3d (T)
Function File: tform = affine3d ()

tform is a representation of an affine 3D transform. Calling affine3D without parameters, (affine3d ()) produces the identity transformation.

affine3d takes a transpose of the affine matrix as described in standard literature it performs the transformation as follows: v = (u*T)(1:3) where u = [x y z 1] and T = [a b c 0; d e f 0; g h i 0; j k l 1] [a b c; d e f; g h i] is a transposed rotation\shear matrix, [j k l] is the translation vector, where j = dx, k = dy, l = dz.

affine3d methods:

"invert"

invert (tform) - produces the inverse transform of affine3d transform

"isRigid"

isRigid (tform) - checks if transform tform is only rotation or translation.

"isSimilarity"

isSimilarity (tform) - checks if transform tform is only homogeneous scaling, rotation, reflection or translation.

"isTranslation"

isTranslation (tform) - checks if transform tform is is a pure translation

"outputLimits"

outputLimits (tform, xlims, ylims, zlims) - given a bounding cube corner coordinates in xlims, ylims and zlims (top left front, right bottom back) - returns the new bounding cube after transformation.

"transformPointsForward"

transformPointsForward(tform, u, v, w) - apply transformation tform on the set of u, v, w points (1xn vectors) transformPointsForward(tform, U) - apply transformation tform on U (3xn matrix)

"transformPointsInverse"

transformPointsInverse(tform, u, v, w) - apply the inverse transformation of tform on the set of u, v, w points (1xn vectors) transformPointsInverse(tform, U) - apply the inverse transformation of tform on U (3xn matrix)

See also: affine2d.

Package: image