Borrar filtros
Borrar filtros

Segmentation not working properly?

6 visualizaciones (últimos 30 días)
Warid Islam
Warid Islam el 17 de Oct. de 2022
Comentada: Warid Islam el 21 de Oct. de 2022
I want to segment tumors from stomach. 'u2.png' is the original image. The region inside the red boundary should be the actual segmentated region. However, my segmentation result is 'u1.png', which is not correct. I tried the method below. Any suggestions would be appreciated, Thank you.
T = graythresh(m); % find the threshold for input image
S = imbinarize(m,T); % Segment the image using thresholding
figure, imshow(S,[])
binaryImage = imfill(S, 'holes');
figure, imshow(binaryImage)
BW = bwareafilt(binaryImage, 1);
figure, imshow(BW)
  9 comentarios
Walter Roberson
Walter Roberson el 21 de Oct. de 2022
figure, imshow(j)
[numrow, numcol] = size(j);
x = max(3, min(x, numcol-2));
y = max(3, min(y, numrow-2));
a 5 x 5 window centered on x and y should now be entirely within the image, provided that the image has at least 5 rows and 5 columns.
At this point you can do things like
subimage = j(y-2:y+2, x-2:x+2);
do growing within subimage starting from (2,2)
or you can do
maskedimage = zeros(numrow, numcol, 'like', j);
maskedimage(y-2:y+2, x-2:x+2) = j(y-2:y+2, x-2:x+2);
do growing on maskedimage starting from row y column x
Warid Islam
Warid Islam el 21 de Oct. de 2022
Thank you very much.

Iniciar sesión para comentar.

Respuestas (1)

Vinayak Choyyan
Vinayak Choyyan el 20 de Oct. de 2022
As per my understanding, you are trying to perform medical image segmentation. I see you are trying to use predefined segmentation techniques but have not got good results.
Please check out this link
to know more about the segmentation tools and methods provided in MATLAB and easily try out various segmentation techniques, including deep learning based segmentation, through MATLAB’s Image Segmenter App. You can also use the Image Segmenter App to refine the segmentation and get better results.
  3 comentarios
Vinayak Choyyan
Vinayak Choyyan el 21 de Oct. de 2022
In that case you can train a supervised deep learning model to do automatic segmentation.
You will have to create dataset to train the model for automatic segmentation. To label/segment the training images, you can use the Image Labeler, Video Labeler, or Ground Truth Labeler apps. Then you could train various deep learning models like convolutional neural network (CNN) based encoder decoder segmentations to get a fairly accurate model. You can leverage the tools available in MATLAB, which you can find in the link in my comment above.
Or you could also find many examples of medical image segmentation on google which used deep learning and produced good results of accuracy. It is a highly explored topic.
Warid Islam
Warid Islam el 21 de Oct. de 2022
Thank you for your suggestions.

Iniciar sesión para comentar.


Más información sobre Image Data Workflows en Help Center y File Exchange.




Community Treasure Hunt

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

Start Hunting!

Translated by