Grain Model how to remove smaller grains

2 vues (au cours des 30 derniers jours)
David Harra
David Harra le 8 Juin 2022
Commenté : Image Analyst le 8 Juin 2022
I have a grain model which consists of lots of tiny grains and clusters of of larger grains. I am wondering how it is possible to separate the smaller grains from the larger grains like the example below
I plot my grains by reading in rectilinear coordinates via reading in an Amira file to Matlab. This lets me plot my material matrix but I have no idea how to go about separating the grains. Has anyone done something similar before? I would be more than happy to share my files if anyone can point me in the right direction.
Thanks :)

Réponses (3)

Constantino Carlos Reyes-Aldasoro
A bit difficult to help more without the data but I think that your problem can be fixed by selecting your grains by the properties using ismember
Have a look and let us know if this solves your problem or not
  1 commentaire
David Harra
David Harra le 8 Juin 2022
Hi constantino
I had a read through this but not sure how to apply this to my data. I'm not the best or imaginative when it comes to coding unfortunately.
You can access my data via this link
Grain Model and the password is matlab2022
Im not sure how else I can share my data on here.
Any Help would be appreciated.

Connectez-vous pour commenter.


Image Analyst
Image Analyst le 8 Juin 2022
If you have a binary image of the grains, you can use bwareaopen or bwareafilt to extract grains of a certain size.
  2 commentaires
David Harra
David Harra le 8 Juin 2022
I had a look at these functions but can't seem to get anything close. I will need my data for both segmented parts so I can obtain some statistics from the, The distribution of smaller grains and distribution of larger features.
Image Analyst
Image Analyst le 8 Juin 2022
Do you have a labeled image? Or indexed image? It looks like you do because you have separate colors for them. If you do, you can do it.

Connectez-vous pour commenter.


Constantino Carlos Reyes-Aldasoro
Ok, I think now I understand your problem. I thought you had information on the grains themselves, but if you are starting with a grainy image, what you need to do is to filter the image. Take your original image (this one includes the title and labels as it is the one you sent)
Use a median filter like this
imagesc(medfilt3(MatGrid,[5 5 1]))
And that removes the small grains from the image.
  1 commentaire
David Harra
David Harra le 8 Juin 2022
Hi Constantino
Not sure if this is the correct method I would need. I think separating them rather than removing them would be better put like the example above. Once I am able to achieve this I want to do a histogram so I can get the distrubution of grains for the samll grains and like was for the larger features.
As you can notice from the example above both images would join back together like a jigsaw. I just can't seem to figure out what has been done to achive this. All my data is within the Amira file so perhaps something can be altered.
Thanks so far for the help its pushing me in the right direction :)

Connectez-vous pour commenter.

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by