an image that knows where on the specimen it sits: a raster of values on a regular grid of an origin and two perpendicular steps; MATLAB’s mapImage

Syntax

mg = mapImage(img)

Unit step, a frame of its own.

mg = mapImage(img, dxy=0.05, name='bse')

Square pixels of 0.05.

mg = mapImage(img, dxy=(0.05, 0.1))

Rectangular pixels.

mg = mapImage(ebsd.bc, ebsd, name='bcImg')

A channel of a gridded map, the map along.

mg = mapImage(img, ebsd)

An image on the grid of the map.

Description

A forescatter or backscatter image, a band contrast map or any other value per pixel, together with the part of the specimen each pixel covers, which makes an image and an EBSD map comparable.

The grid is regular: d1 is the step from row to row, d2 from column to column, and the positions follow from them. A distortion is applied by resampling, never by moving the pixels. An image with a map carries the map along, on the same grid, which must be square; a map that is not gridded is gridified first. An integer image is divided by the largest value of its type, so an unsigned one lies in [0, 1].

Input

img array of rows x columns, or rows x columns x channels
ebsd EBSD, gridded and square, on the grid of the image

Keywords

keyword default description
dxy   the pixel size, one number or (dx, dy), for an image without a map
origin   vector3d, the position of pixel (0, 0)
name   an identifier, the property of the EBSD map an aligned image is written into
scanUnit   the unit of the positions, by default the map’s or ‘um’

Output

mg mapImage

Properties

img floating-point raster of shape (rows, columns) or (rows, columns, channels)
origin specimen position of the centre of pixel (0, 0)
d1, d2 Cartesian step vectors for increasing row and column indices
frame specimenFrame of the image geometry
pos derived vector3d positions of pixel centres
ebsd associated EBSD map on the same grid, when supplied
name image or channel name used in displays and registration

See also

mapImageList, trueEbsd, mapImage.rescale, xcfShift, gridLayout, EBSDMapsAndImages, EBSDTrueEbsd

Members

char the image as one line of text: its size, channels, steps, name and whether a map rides along
copy a copy of the image with its own pixel array
d1 the step from one row to the next
d2 the step from one column to the next
dx the column step, the length of d2
dy the row step, the length of d1
edgeMap the edge transform: how unlike its eight neighbours at padWidth pixels each pixel is, every channel contrast normalised over its 2nd to 98th percentile, a neighbour off the image differenced against zero
extent [xmin, xmax, ymin, ymax, zmin, zmax] of the pixel centres
gridCoordinates where positions sit in grid coordinates, fractional rows and columns from zero
gridSize the number of rows and columns of the image
how2plot the plotting convention of the image’s frame, None without a frame
imboxfilt a box filter of k pixels, or (rows, cols), odd: the window shrinks at the border and around a missing value, so a NaN padding neither spreads nor darkens the frame (MATLAB’s own, movmean down the columns and then along the rows)
interp the image values at arbitrary positions
isempty whether the image has no pixel
layout the gridLayout of the image, the directions its rows and columns advance along
mapImage an image that knows where on the specimen it sits: a raster of values on a regular grid of an origin and two perpendicular steps
nChannel the number of channels, 1 for a two dimensional image
origin the centre of pixel (0, 0)
plot an image, or a list of them, drawn where it sits on the specimen, in the specimen’s coordinates and in the screen orientation of its frame
pos2ind the pixel of the image covering each position
pos the centre of every pixel, (rows, cols)
rescale the values of one or more images stretched to a common range
subGrid a rectangle cut out of the image
transformReferenceFrame the images stated in a frame and laid out that way: a layout reindexes and nothing else, a frame restates where they sit by the orientation given, by ‘byScreenAlignment’, the assertion that the frames were drawn the same way up, or by nothing where the frames are already related

Used on

EBSDMapsAndImages, EBSDTrueEbsd

MATLAB’s mapImage_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/mapImage_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.