Extraction of tumour, Dilation and Drawing a boundary around tumour

1 visualizzazione (ultimi 30 giorni)
I have attached the image of a slice in which tumour is visible. I want to dilate the image and extract the tumour. After extracting the tumour I have to draw boundary around the tumour using 8 point connected components. This is the code I have tried but I am not able to get the desired output. Please help me with this problem and if possible with the proper code. g1=double(g1); g2 = im2bw(g1); s=strel('square',2); xt=imdilate(g2,s); %%% dilating to get the edge region filled properly xd=double(xt); x1=edge(xd,'canny'); %%%% finding edge so as to get 1 single line for contour extraction. figure imshow(x1) sz=size(x1); x1=double(x1);

Risposte (1)

Arun Mathamkode
Arun Mathamkode il 2 Feb 2018
You have to normalize the image before passing it into the im2bw function. Please refer to the following answer

Community Treasure Hunt

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

Start Hunting!

Translated by