How to remove small portion in an image?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Ahmad
el 5 de Jun. de 2017
Comentada: Ahmad
el 10 de Jun. de 2017
I am segmenting liver from CT data. Its 2d segmentation on multiple imaging. I trained my system using deep learning method. Now the results of segmentation are as follows...
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/164867/image.png)
I want to remove the circle parts from my image. I already tried bwareaopen() function from matlab. Using bwareaopen() function I got the whole image white. please help me.
Thanks
2 comentarios
KSSV
el 5 de Jun. de 2017
If you have the locations of those highlighted images, cant you replace those pixel values with black?
Respuesta aceptada
sunkara manoj
el 5 de Jun. de 2017
the result is a binary image but the part is extracted.
if true
I=imread('liver.png');
im = imclearborder(im2bw(I));
im_fill = imfill(im, 'holes');
s = regionprops(im_fill, 'Area', 'PixelList');
[~,ind] = max([s.Area]);
pix = sub2ind(size(im), s(ind).PixelList(:,2), s(ind).PixelList(:,1));
out = zeros(size(im));
out(pix) = im(pix);
imshow(out); end
3 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Read, Write, and Modify Image 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!