How to remove small portion in an image?

조회 수: 1 (최근 30일)
Ahmad
Ahmad 2017년 6월 5일
댓글: Ahmad 2017년 6월 10일
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...
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
KSSV
KSSV 2017년 6월 5일
If you have the locations of those highlighted images, cant you replace those pixel values with black?
Ahmad
Ahmad 2017년 6월 6일
I want to do automatically. sunkara manoj code working perfectly but now I need to smoothen the boundaries.

댓글을 달려면 로그인하십시오.

채택된 답변

sunkara manoj
sunkara manoj 2017년 6월 5일
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
KSSV
KSSV 2017년 6월 6일
How about using convexhull?
Ahmad
Ahmad 2017년 6월 10일
I never tried. I dont know the purpose of convex hull.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by