bwfill in IDL? [message #31069] |
Mon, 03 June 2002 08:27 |
Gert Van de Wouwer
Messages: 21 Registered: January 2002
|
Junior Member |
|
|
Hi
Is there an analog of Matlab's bwfill method in IDL?
i.e. something like
[y, indx] = bwfill(x,startR, startC);
where x is a binary image, startR and StartC begincoordinates to begin
flooding the image (e.,g. all black pixels) and return the result in image y
and coordinates of filled positions in indx?
Example taken from Matlab documentation:
BW1 = [1 0 0 0 0 0 0 0
1 1 1 1 1 0 0 0
1 0 0 0 1 0 1 0
1 0 0 0 1 1 1 0
1 1 1 1 0 1 1 1
1 0 0 1 1 0 1 0
1 0 0 0 1 0 1 0
1 0 0 0 1 1 1 0]
BW2 = bwfill(BW1,3,3,8)
BW2 =
1 0 0 0 0 0 0 0
1 1 1 1 1 0 0 0
1 1 1 1 1 0 1 0
1 1 1 1 1 1 1 0
1 1 1 1 0 1 1 1
1 0 0 1 1 0 1 0
1 0 0 0 1 0 1 0
1 0 0 0 1 1 1 0
thanks,
Gert
|
|
|