mapImage.edgeMap edit page

the edge transform of an image: how unlike its neighbours each pixel is

Absolute brightness is not comparable between a band contrast map and a backscatter image - they are different physics - but boundaries appear in both. Correlating edge transforms rather than raw values is what makes two such images registrable against each other at all.

Each channel is contrast normalised over its 2nd to 98th percentile, then for each of the eight neighbours the difference vector across channels is taken and its length summed in. A pixel whose neighbour lies off the image differences against zero.

Description

This is work, not a property read - the whole image is normalised and differenced eight times. Compute it once and keep it; a loop that reads it per iteration pays for it every time.

The scale is the same whatever the channel count, so edge maps of a greyscale and a colour image are directly comparable. TrueEBSD's GenBoundaryMap, which this reproduces, returns sqrt(3) times this on a single channel image - it replicated greyscale into three identical channels and reduced them by a Euclidean norm. That factor is invisible to cross correlation, which zero means and unit normalises every tile, so dropping it changes no registration result.

Syntax

e = edgeMap(mg)
e = edgeMap(mg,3)

Input

mg mapImage
padWidth neighbour distance in pixels, default 1. Raise it to bring out boundaries blurred over several pixels

Output

e r × c, one value per pixel

See also

mapImage mapImage.interp

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/mapImage.edgeMap.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.