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

1 vue (au cours des 30 derniers jours)
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 commentaires
Image Analyst
Image Analyst le 15 Août 2011
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 le 16 Août 2011
maybe you can help me image analyst...

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Image Segmentation and Analysis dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by