Segmentation of a tumor in xray
조회 수: 3 (최근 30일)
이전 댓글 표시
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. ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1702716/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1702716/image.jpeg)
댓글 수: 0
답변 (1개)
Image Analyst
2024년 6월 20일
편집: Image Analyst
2024년 6월 20일
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.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!