trueEbsd.trueEbsd edit page

align a sequence of images and EBSD maps of one specimen area

Two pictures of the same area rarely overlay: the EBSD map is taken at a tilt and drifts as it scans, the electron images do not, and no single distortion relates the extremes. TrueEBSD relates them through a CHAIN of intermediate maps instead, each pair separated by one distortion simple enough to fit, and composes the hops. What comes out is one common grid on which every pixel of every map is the same piece of specimen, so an image becomes a per pixel property of the map.

The sequence is ordered from the most distorted map to the ground truth, and hop n separates imgList(n) from imgList(n+1). Three methods walk it: pixelSizeMatch puts every map on one grid, calcDistortion measures and fits each hop, undistort accumulates the hops and resamples.

A handle class, as every class guiding a process in MTEX is - see parentGrainReconstructor. The methods still return the job, so job = pixelSizeMatch(job,pixSz) reads as before, but the job is modified in place: a second variable holding it is an alias rather than a snapshot, and a method that errors part way leaves the job partly filled.

The distortion of a hop is an unfitted spatialTransform: its class names the distortion that separates the pair and calcDistortion fills in the coefficients. A hop of several stages is written with + and never with *, since * absorbs an unfitted prototype as the identity and so drops a stage. Where nothing separates a pair, the entry is spatialTransformId.

Syntax

job = trueEbsd(imgList)

A job with the distortions set later.

job = trueEbsd(imgList,T)

A job with one distortion per hop.

imgList = [mapImage(ebsd.bc,ebsd), mapImage(img,'dxy',0.05)]
job = trueEbsd(imgList, spatialTransformShift + spatialTransformDrift)
job.pixelSizeMatch
job.calcDistortion('fitErr')
job.undistort

Align an EBSD map to an image: match the pixel sizes, fit, resample.

Input

imgList mapImage array, most distorted first, ground truth last. One array, not one argument per map. An EBSD map joins the sequence as mapImage(ebsd.bc,ebsd) - an image, with the map riding along
T spatialTransform array, one per hop, numel(imgList)-1 of them. Unfitted prototypes. May also be set afterwards as job.T

Output

job trueEbsd

Class Properties

imgList mapImage array as imported, differing pixel sizes and extents
T spatialTransform array, one per hop
resizedList mapImage array on one common pixel grid, filled by pixelSizeMatch
shifts cell, one entry per hop, each a pairShifts array with one entry per fit stage: the shifts that stage was fitted to
fitError pairShifts array, one per hop: the shifts measured AFTER correction, which is what says whether registration worked. Needs the 'fitErr' flag
undistortedList mapImage array, aligned, filled by undistort
opt struct array, one per map, the registration settings. Set with setOptions rather than by hand
Indexing
With numel(job.T) == numel(job.imgList) 1, hop n separates map n from map n+1. job.T is a sequence while every spatialTransform method takes one transform, so inv(job.T) and isid(job.T) do not work: index a hop, or fold the chain with *.
job.imgList(n) % map n, a mapImage job.T(n) % the spatialTransform of hop n job.opt(n) % the settings for map n job.shifts{n}(m) % the shifts of hop n, fit stage m job.fitError(n) % the residual pairShifts of hop n

References

Tong et al., TrueEBSD in MTEX: automatic image matching for correlative microscopy applications, arXiv 2605.00703

See also

mapImage spatialTransform pairShifts trueEbsd.pixelSizeMatch trueEbsd.calcDistortion trueEbsd.undistort trueEbsd.setOptions parentGrainReconstructor

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/trueEbsd.trueEbsd.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.