how to clean the background noise, separated the object and background in dilate and erode ....

1 回表示 (過去 30 日間)
Megah Putri
Megah Putri 2011 年 8 月 15 日
this is my code :
BWs=edge(image1,'canny'); se90=strel('line',3,90); se0=strel('line',3,0); BWsdil=imdilate(BWs,[se90 se0]); BWdfill=imfill(BWsdil,'holes'); BWnobord=imclearborder(BWdfill,1); seD=strel('disk',3); BWfinal=imerode(BWnobord, seD); BWfinal=imerode(BWfinal, seD); BWfinal=invertimage(BWfinal); axes(handles.axes1); imshow(BWfinal); imagemorfologi1=BWfinal; gambar=(imagemorfologi1); nama = strcat('image/dilasierosi/dilasi_',as,'.jpg'); imwrite(gambar,nama); end
and the this is a result : (maybe you can download this, if you want to help me ...)
so, what the problem is? yes I like how the background in order to dilate and erote results are not visible and only the passage of object that looks ... so please help me, thanks before.... ( maybe if the object black the background is white , or if the object white the background is black ).... that something missing in my code and must be added .... ?
  3 件のコメント
Image Analyst
Image Analyst 2011 年 8 月 15 日
Why are you starting a new thread? This seems just like your thread: http://www.mathworks.com/matlabcentral/answers/13665-how-to-make-im-using-dilate-and-erode-in-matlab-and-then-i-want-to-separate-the-background-and
Megah Putri
Megah Putri 2011 年 8 月 16 日
maybe you can help me image analyst...

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Segmentation and Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by