DSPRelated.com
Forums

bwmorph --- Image processing problem

Started by Zahra A Shah May 16, 2003
i have to use bwmorph to fill 1-pixel white holes in a binary image. for that i
use
i = imread('img.bmp');
k = bwmorph(i,'clean',Inf);
These statements remove holes of the form:
0 0 0
0 1 0
0 0 0
But does not cater for holes like
1 0 0
0 1 0
0 0 0
OR
1 0 0
0 1 0
0 0 1
OR
0 0 0
0 1 0
0 0 1
What do i do to fill up these kinds of 1-pixel holes
Thankyou
Zahra Atiq Shah