Errenoeous shape and size parameters after grain merging

60 views
Skip to first unread message

Maël Allard

unread,
Nov 12, 2019, 5:40:56 AM11/12/19
to MTEX
Hi mtex peoples,

I'm facing a problem with grain parameters after merging.
In the attached pictures you can see plots for shapeFactor before merging ("grains") and after ("grains_merged").

You can see that values below 1 exists, which shouldn't be possible because of the way it's calculated. Also, if the higher ids corresponds to merged grains we see that the problem concern all grains, and not only those which had twins at the beginning.

Because of that, I'm wondering if other parameters such as aspect ratio, grain size or area for example have also a problem of calculation.

Do you have any idea about the way the "merge" function could modify these parameters ?

Sincerely,

Maël Allard
Initial_ShapeFactor_360B13.jpg
Merged_grains_ShapeFactor_360B13.jpg
Initial_ShapeFactor_360B32.jpg
Merged_grains_ShapeFactor_360B32.jpg

Rüdiger Kilian

unread,
Nov 12, 2019, 6:22:11 AM11/12/19
to mtex...@googlegroups.com
Hi Mael,
could you manage to plot some of the potentially erroneous grains so we could have a look at them? E.g. plot(grains(grains.shapefactor<1)) or
plot(grains, grains.shapefactor)
Cheers,
Rüdiger

Maël Allard

unread,
Nov 12, 2019, 7:42:48 AM11/12/19
to MTEX
Hi Rüdiger,

Here are the plots.

Thank you,
Maël
ShapeFactor_map_360B49.jpg
ShapeFactor_map_less_1_360B49.jpg
ShapeFactor_map_360B13.jpg
ShapeFactor_map_less_1_360B13.jpg
ShapeFactor_map_360B32.jpg
ShapeFactor_map_less_1_360B32.jpg

Rüdiger Kilian

unread,
Nov 12, 2019, 11:23:59 AM11/12/19
to mtex...@googlegroups.com
Hi Mael,

could you try this commit () and see if it works for you?

Cheers,
Rüdiger

Maël Allard

unread,
Nov 12, 2019, 11:59:32 AM11/12/19
to MTEX

Hi Rüdiger,

I have replaced the initial "merge.m" function in @grain2d by the one you sent me, but the result is the same, at least for shape factor, I still have <1 values.

Thanks,

Maël

Rüdiger Kilian

unread,
Nov 12, 2019, 2:02:16 PM11/12/19
to mtex...@googlegroups.com
Hi,
can you select some of these grains and just send me the .mat of those to me?
fg = grains(grains.shapefactor>1);
save('some_grains.mat',fg)

Cheers,
Rüdiger

Maël Allard

unread,
Nov 13, 2019, 2:41:16 AM11/13/19
to MTEX

Ralf Hielscher

unread,
Nov 13, 2019, 2:52:32 AM11/13/19
to mtex...@googlegroups.com
Hi Mael,

could you please try adding the line

grainsMerged.inclusionId(newInd) = grains.inclusionId(keepInd);

to grain2d/merge.m

at line 79?

Thank you for bringing up this issue.

Ralf.



********************************************************************
Ralf Hielscher                   Tel: +371-531-38556
Fakultät für Mathematik               +371-531-22200 (Sekr.)
Technische Universität Chemnitz  Fax: +371-531-22109
Reichenhainer Str. 39            E-mail: ralf.hi...@mathematik.tu-chemnitz.de
D-09126 Chemnitz                 http://www.tu-chemnitz.de/~rahi
********************************************************************


--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/mtexmail/0359e7bf-cdae-4431-90e1-e55f59f27ee4%40googlegroups.com.

Maël Allard

unread,
Nov 13, 2019, 3:37:11 AM11/13/19
to MTEX
I added the line in the original "merge" function in grain2d,
it's better now, the bug seems fixed for grains without twins before the merge,
but for twin merged grains we still have <1 values.

Here is the *.mat file if needed:

Cheers,
Maël
Merged_grains_ShapeFactor_360B32_new.jpg
ShapeFactor_map_less_1_360B32_new.jpg

Ralf Hielscher

unread,
Nov 13, 2019, 3:47:39 AM11/13/19
to mtex...@googlegroups.com
Hi Mael,

just to clarify. The line I gave you was supposed to be additional to the changes made by Rüdiger. So you need to paste my line into the merge file from Rüdiger.

If you did so. Could you provide us with the data before merging and the lines of code that do the merging.

Thank you very much,

Ralf.


********************************************************************
Ralf Hielscher                   Tel: +371-531-38556
Fakultät für Mathematik               +371-531-22200 (Sekr.)
Technische Universität Chemnitz  Fax: +371-531-22109
Reichenhainer Str. 39            E-mail: ralf.hi...@mathematik.tu-chemnitz.de
D-09126 Chemnitz                 http://www.tu-chemnitz.de/~rahi
********************************************************************

--
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.
Message has been deleted

Rüdiger Kilian

unread,
Nov 13, 2019, 5:31:49 AM11/13/19
to mtex...@googlegroups.com
Hi,
using the lastest commits, inclusionId seems to be fine and the minium shapefactor I get for Maels grains is 1.0129 and no errors.
I guess I could close for now https://github.com/mtex-toolbox/mtex/issues/433

Cheers,
Rüdiger

Reply all
Reply to author
Forward
0 new messages