remove vertices that carry no shape information
Description
Douglas-Peucker simplification applied to each chain separately. A vertex is dropped if removing it moves the boundary by less than epsilon. The junctions are the ends of the chains and are always kept, so which grains touch, and where, is unchanged.
Unlike reduce, which keeps every n-th vertex regardless of shape, this removes many vertices along a straight run and none at a corner. On a pixel grid it is what turns a staircase into the straight line it approximates.
A grain smaller than epsilon would lose every one of its vertices and collapse onto a line. Those grains are left uncoarsened - epsilon says how far the boundary may move, not that a grain may be deleted.
Syntax
gB_s = simplify(gB)
gB_s = simplify(gB,epsilon)
gB_s = simplify(gB,epsilon,'protect',vertexIds)Input
| gB | grainBoundary |
| epsilon | tolerance in EBSD units (default: the median segment length over sqrt(2) - a staircase on a grid of spacing d is never further than d/sqrt(2) from the straight line it approximates, the worst case being a boundary at 45 degree, so that is the tolerance which removes the grid and nothing else. At d/2 a 45 degree staircase does not collapse) |
Output
| gB_s | grainBoundary |
Options
| protect | ids of vertices that must survive, on top of the junctions |
See also
grainBoundary.reduce grainBoundary.refine grain2d.simplifyBoundary grain2d.smoothBoundary
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/grainBoundary.simplify.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.