smooth edit page

smooth spatial EBSD

Syntax

ebsd = smooth(ebsd)
F = halfQuadraticFilter
F.alpha = 2;
ebsd = smooth(ebsd, F, 'fill', grains)

Input

ebsd EBSD
F @EBSDFilters
grains grain2d if provided pixels at the boundary between grains are not filled

Options

fill fill missing values (this is different then not indexed values!)
extrapolate extrapolate up the the outer boundaries

Example

mtexdata forsterite;
ebsd = ebsd('indexed');
% segment grains
[grains,ebsd.grainId] = calcGrains(ebsd);
ebsd = EBSD
 
 Phase  Orientations     Mineral         Color  Symmetry  Crystal reference frame
     0   58485 (24%)  notIndexed                                                 
     1  152345 (62%)  Forsterite  LightSkyBlue       mmm                         
     2   26058 (11%)   Enstatite  DarkSeaGreen       mmm                         
     3   9064 (3.7%)    Diopside     Goldenrod     12/m1       X||a*, Y||b*, Z||c
 
 Properties: bands, bc, bs, error, mad
 Scan unit : um
 X x Y x Z : [0 36550] x [0 16750] x [0 0]
 Normal vector: (0,0,1)
% find largest grains
largeGrains = grains(grains.grainSize>800);
ebsd = ebsd(largeGrains(1));
figure
plot(largeGrains(1).boundary,'linewidth',2)
hold on
oM = ipfHSVKey(ebsd);
oM.inversePoleFigureDirection = mean(ebsd.orientations) * oM.whiteCenter;
oM.colorStretching = 50;
plot(ebsd,oM.orientation2color(ebsd.orientations))
hold off