Effacer les filtres
Effacer les filtres

Segmentation of a tumor in xray

6 vues (au cours des 30 derniers jours)
Beatriz
Beatriz le 23 Mai 2024
Modifié(e) : Image Analyst le 20 Juin 2024
Hello,
I am a MATLAB newbie. I have a school task in which I received an xray of a head in lateral position in order to segment a tumor and calculate it's area and centroid.
I used
imbinarize_image_adaptative = imbinarize(tumorP,"adaptive","ForegroundPolarity","bright","Sensitivity",0.3); to obtain a threshold image and image_thres_adapt_remove = bwareaopen(imbinarize_image_adaptative,4150,6); to remove details. However i am fraid that i have removed too much information from the picture. I add here the picture resulting from threshold and bwareaopen.
I was told by my professor to use erosion and dilation to try obtain an image where I can apply the existent functions to calculate the area and centroid. I was told that the tumor needs to have a higher brightness to use them.
I have tried different strels and I subtracted the image from the erosion (B) from the image resulting from bwareaopen however, I always have the edges of the skull so I don't really know what to anymore. Can someone help me?
I don't want to remove so much information but at the same time I don't know how to obtain an image that enables me to do the calculations otherwise.

Réponses (1)

Image Analyst
Image Analyst le 20 Juin 2024
Modifié(e) : Image Analyst le 20 Juin 2024
See my attached demo where I do essentially the same thing.
One way to get rid of the skull is to call bwlabel and then use ismember to remove all blobs but the first one. The skull will have a label of 1 since it's the leftmost blob.
[labeledImage, numBlobs] = bwlabel(mask);
mask = ismember(mask, 2:numBlobs);
It's a generic, general purpose demo of how to threshold an image to find blobs, and then measure things about the blobs, and extract certain blobs based on their areas or diameters.

Catégories

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

Community Treasure Hunt

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

Start Hunting!

Translated by