a numerical inverse of a spatial transform without a closed-form inverse

Syntax

Ti = spatialTransformInverse(T, tol=1e-10, maxIter=100)
original = Ti * transformed

Description

Starting at each target position, fixed-point iteration subtracts the error between its current image and the target. This works for sufficiently small, well-behaved distortions; a folded map or a poorly converging iteration raises ValueError.

Convergence requires the largest xy error to be at most tol times max(1, the largest absolute finite target coordinate). Iteration also stops if the error ceases to decrease sufficiently after the first three steps. The z coordinate is preserved.

Input

T spatialTransform to invert
tol relative position tolerance; default 1e-10
maxIter maximum iteration count; default 100

Output

Ti spatialTransformInverse

See also

spatialTransform.inv, spatialTransformField, spatialTransformPoly

Members

eval the preimage by fixed point iteration: the position moved against the error its image makes
inv the transform it inverts
isid whether the inverted transform is the identity
paramChar the parameters of the inverted transform as a line of text
shortChar the short name of the inverted transform with the prefix inv-

MATLAB’s spatialTransformInverse_index

source

Citing this page. This page is part of the documentation of MTEX, a free and open source MATLAB toolbox for analyzing and modeling crystallographic textures. It was written by The MTEX Developers and is published at https://mtex-toolbox.github.io/spatialTransformInverse_index_py.html. If you use MTEX, or reuse text or figures from this page, in your research, please cite

F. Bachmann, R. Hielscher, H. Schaeben: Texture Analysis with MTEX - Free and Open Source Software Toolbox, Solid State Phenomena 160 (2010), 63-68. 10.4028/www.scientific.net/SSP.160.63

BibTeX
@article{bachmann2010mtex,
  author  = {F. Bachmann and R. Hielscher and H. Schaeben},
  title   = {Texture Analysis with MTEX - Free and Open Source Software Toolbox},
  journal = {Solid State Phenomena},
  volume  = {160},
  pages   = {63-68},
  year    = {2010},
  doi     = {10.4028/www.scientific.net/SSP.160.63},
  url     = {https://doi.org/10.4028/www.scientific.net/SSP.160.63}
}

Other papers describing specific MTEX methods are listed under Publications — please cite the one that best fits your application. The MTEX source code is licensed under the GNU General Public License v2.0; the text and figures of this documentation are licensed under CC BY 4.0, which permits reuse — including by automated systems — provided The MTEX Developers and this page are credited.