Please be as detailed as possible, explain what you want to do, what kind of data you are using. Attaching simplified code and data is always useful. Click the the button { } to inline code and finally remove these lines before posting :)
Hello,
I'm facing a problem with grain smooth and fill. I will try to explain as much as I understand it.
When I operate calc grain from an raw ebsd data, I can easily identify LAGB and HAGB (See 'Raw ebsd data' & 'LAGB&HAGB without smooth' attached).
Note : I just separate core grains from shell grains, that why you see empty data.
ebsd=ebsd('Nickel','Nickel')
% gB Classes - Définition des GB :
gB=core_grains3.boundary;
gB=gB('Nickel','Nickel');
% Create classes of gB regarding threshold angle
gB_i15=gB(gB.misorientation.angle<=15*degree);
gB_s15=gB(gB.misorientation.angle>15*degree);
% Plot at once all gB
figure;plot(gB_i15,'linecolor',[0 255 0]/255,'linewidth',2,'DisplayName',' LAGB < 15^\circ');
hold on
plot(gB_s15,'linecolor',[255 0 0]/255,'linewidth',2,'DisplayName',' HAGB > 15^\circ');
hold off
As you can see, there are some data I want to remove : scratch and single pixel grains (especially in the pink grain on the right).
So I smooth and fill the data with this script :
ebsd2=ebsd(core_grains);
F = medianFilter;
F.numNeighbours = 1
% smooth the data
ebsd3 = smooth(ebsd2,F,'fill');
[core_grains2,ebsd3.grainId] = calcGrains(ebsd3,'angle',2*degree);
core_grains3=core_grains2('indexed'); %Prendre en compte seulement les grains indexé
figure;plot(ebsd3('Nickel'),oM.orientation2color(ebsd3('Nickel').orientations),'micronbar','off')
hold on
plot(core_grains3.boundary,'linewidth',0.5);
hold off
And I use again my first script to identify LAGB and HAGB. But here is the problem. Some data are missing... (See 'Smoothed ebsd data' & 'LAGB&HAGB with smooth' attached).
Is the smooth and fill process erase some boundaries parameters (especially gB.misorientation) ?
I need to make an histogram to separate LAGB, HAGB and CSL, but if boundaries data are missing (or are erased) after smooth, it is not usefull to do it.
By advance thank you for your help MTEX community :)
Daniel V.