Concurrently segmenting for HAGB and LAGB?

156 views
Skip to first unread message

MTEXNewbie

unread,
Apr 4, 2019, 8:03:03 AM4/4/19
to MTEX
Currently, I segment once at the beginning of EBSD data processing. Is there a way to segment HAGB (>15°) and LAGB (2°-15°) at the beginning simultaneously?

Current workflow:
%% Import the Data

% create an EBSD variable containing the data
ebsd = loadEBSD(fname,CS,'interface','crc',...
  'convertSpatial2EulerReferenceFrame');

% % Take a look at the initial data without the non-indexed points
% plot(ebsd('indexed'))

% ######### Correction #########
% plot(ebsd,ebsd.mad)
% mtexColorbar
% % plot a MAD histogram
% hist(ebsd.mad)

% take only those measurements with MAD smaller than prescribed value set them to nonIndexed
ebsd(ebsd.mad>1.2).phase=0;

% ######### Adjust (rotate & crop) #########
% rotate the whole data set (orientations and spatial) about the z-axis by
% 90*degree to get vertical strut
ebsd = rotate(ebsd,-90*degree);

% % plot the band contrast
% plot(ebsd,ebsd.bc)
% colormap gray % this makes the image grayscale
% mtexColorbar

% segmentation angle typically 10 to 15 degrees
seg_angle = 15;

% minimum indexed points per grain between 5 and 10
min_points = 0;

% compute grains. either use 'angle' or 'unitcell' for segmentation
[grains,ebsd.grainId] = calcGrains(ebsd('indexed'),'unitcell');
% [grains,ebsd.grainId,ebsd.mis2mean] = calcGrains(ebsd,'angle',seg_angle*degree);

% ######### Clean #########
% Remove small grains with less than min_points indexed points
grains = grains(grains.grainSize > min_points);

% Re-calculate grain model to cleanup grain boundaries with less than minimum index points
% used ebsd points within grains having the minimum indexed number of points (e.g. 5~10 points)
ebsd = ebsd(grains);
[grains,ebsd.grainId] = calcGrains(ebsd('indexed'),'unitcell');
% [grains,ebsd.grainId,ebsd.mis2mean] = calcGrains(ebsd,'angle',seg_angle*degree,'boundary','tight');

% ######### Smooth #########
% Due to the measurement grid, the grain boundaries often show a typical staircase effect.
% This effect can be reduced by smoothing the grain boundaries.
grains = smooth(grains,4);
ebsd = ebsd(grains);


Another question, what is the segment angle set by the below code?
[grains,ebsd.grainId] = calcGrains(ebsd('indexed'),'unitcell');

Rüdiger Kilian

unread,
Apr 4, 2019, 8:47:41 AM4/4/19
to mtex...@googlegroups.com
Hi,
you can segment initially with a fairly low angle and use an misorientitation angle as condition to select boundaries within a given interval. You'll find the procedure described in the forum it if you look for low angle boundaries.
Roughly like this:
gb = grains.boundary('x','x')
moriAngle = gb.misorientation.angle
LAB = gb(moriAngle > 1*degee & moriAngle < 10*degee)
LAB = gb(moriAngle >= 10*degree)

Cheers,
Rüdiger
________________________________________
From: mtex...@googlegroups.com <mtex...@googlegroups.com> on behalf of MTEXNewbie <rashed...@gmail.com>
Sent: Thursday, April 4, 2019 2:03:03 PM
To: MTEX
Subject: {MTEX} Concurrently segmenting for HAGB and LAGB?
--
If you want to reduce the number of emails you get through this forum login to https://groups.google.com/forum/?fromgroups=#!forum/mtexmail, click "My membership" and select "Don't send me email updates". You can still get emails on selected topics by staring them.
---
You received this message because you are subscribed to the Google Groups "MTEX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mtexmail+u...@googlegroups.com<mailto:mtexmail+u...@googlegroups.com>.
Visit this group at https://groups.google.com/group/mtexmail.
For more options, visit https://groups.google.com/d/optout.

MTEXNewbie

unread,
Apr 5, 2019, 6:47:38 AM4/5/19
to MTEX
Hi Rüdiger,


I consider HAGB (>15°) = Grains and LAGB (2°-15°) = Sub-grains. If I calculate HAGB by segmenting at an high angle, I often encounter problem. But the other option to segment using 'unitcell' gives good result (the workflow shown above follows this procedure as the initial segmentation).

What is the segment angle set by the below code?

Rüdiger Kilian

unread,
Apr 5, 2019, 6:50:40 AM4/5/19
to mtex...@googlegroups.com
The default segmentation angle is 10 degree.
Rüdiger
________________________________________
From: mtex...@googlegroups.com <mtex...@googlegroups.com> on behalf of MTEXNewbie <rashed...@gmail.com>
Sent: Friday, April 5, 2019 12:47:38 PM
To: MTEX
Subject: Re: {MTEX} Concurrently segmenting for HAGB and LAGB?

MTEXNewbie

unread,
Apr 5, 2019, 7:24:13 AM4/5/19
to MTEX
Hi Rüdiger,

I am getting different result from,

[grains,ebsd.grainId] = calcGrains(ebsd('indexed'),'unitcell');

vs

seg_angle = 10;

[grains,ebsd.grainId,ebsd.mis2mean] = calcGrains(ebsd,'angle',seg_angle*degree,'boundary','tight');

Does the first line works in a different way even though the default segmentation angle is 10 degree there?

Rüdiger Kilian

unread,
Apr 5, 2019, 8:25:34 AM4/5/19
to mtex...@googlegroups.com
Yes.
________________________________________
From: mtex...@googlegroups.com <mtex...@googlegroups.com> on behalf of MTEXNewbie <rashed...@gmail.com>
Sent: Friday, April 5, 2019 1:24:12 PM
To: MTEX
Subject: Re: {MTEX} Concurrently segmenting for HAGB and LAGB?

MTEXNewbie

unread,
Apr 7, 2019, 8:40:33 AM4/7/19
to mtex...@googlegroups.com
Hi Rüdiger,

I was wondering if there is more detail available on how the 'unitcell' approach works, I believe it only gives HAGBs?

[grains,ebsd.grainId] = calcGrains(ebsd('indexed'),'unitcell');

Rüdiger Kilian

unread,
Apr 7, 2019, 11:39:09 AM4/7/19
to mtex...@googlegroups.com
Hi,
no, it simply ties boundaries to explicitly indexed pixels, has nothign to do with the threshold angle.
Cheers,
Rüdiger
________________________________________
From: mtex...@googlegroups.com <mtex...@googlegroups.com> on behalf of MTEXNewbie <rashed...@gmail.com>
Sent: Sunday, April 7, 2019 2:40:33 PM
To: MTEX
Subject: Re: {MTEX} Concurrently segmenting for HAGB and LAGB?

Hi Rüdiger,

I was wondering if there is more detail available on how the 'unitcell' approach works, I believe it only gives HAGBs?

[grains,ebsd.grainId] = calcGrains(ebsd('indexed'),'unitcell');



Reply all
Reply to author
Forward
0 new messages