Effacer les filtres
Effacer les filtres

Image Segmentation to obtain smallest particle

2 vues (au cours des 30 derniers jours)
Tinna Armasamy
Tinna Armasamy le 5 Juin 2017
Commenté : Tinna Armasamy le 5 Juin 2017
How do I do segmentation to obtain smallest particle from a soil image?? I have used the following coding but its not giving accurate result. Please help. Thank you.
soil=imread('Example Image');
soil=rgb2gray(soil);
I_eq=adapthisteq(soil);
bw=im2bw(I_eq,graythresh(I_eq));
bw2=imfill(bw,'holes');
bw3=imopen(bw2,ones(5,5));
bw4=bwareaopen(bw3,40);
bw4_perim=bwperim(bw4);
mask_em=imextendedmax(I_eq,30);
I_eq_c=imcomplement(I_eq);
I_mod=imimposemin(I_eq_c,~bw4|mask_em);
L=watershed(I_mod);
cc = bwconncomp(L,8);
n= cc.NumObjects;

Réponses (1)

Walter Roberson
Walter Roberson le 5 Juin 2017
That is a JPEG image. The smallest particle will probably be a single pixel, and you will have a heck of a time figuring out what is going wrong in your algorithm.
The short summary: never try to do scientific analysis on JPEG images -- not unless what you are trying to analyze is the operation of the JPEG algorithm itself.
  3 commentaires
Walter Roberson
Walter Roberson le 5 Juin 2017
PNG or TIFF or BMP or DICOM.
I am fond of TIFF format; Image Analyst tends to favor PNG.
If you need to store multiple related images together, such as hyperspectral images, then TIFF or DICOM are designed for that, and PNG can be made to work for that, but not the other image formats.
Tinna Armasamy
Tinna Armasamy le 5 Juin 2017
I have tried in TIFF format, but still obtaining similar result. Is there any suggestion whether I have error in my coding itself or any other option I can try in Matlab?

Connectez-vous pour commenter.

Catégories

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

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by