6
|
1 function [imout, idx] = bwselect( im, cols, rows, connect ) |
|
2 # BWSELECT: select connected regions in a binary image |
|
3 # [imout, idx] = bwselect( im, cols, rows, connect ) |
|
4 # |
|
5 # im -> binary input image |
|
6 # [cols,rows] -> vectors of starting points (x,y) |
|
7 # connect -> connectedness 4 or 8. default is 8 |
|
8 # imout -> the image of all objects in image im that overlap |
|
9 # pixels in (cols,rows) |
|
10 # idx -> index of pixels in imout |
|
11 |
|
12 # Copyright (C) 1999 Andy Adler |
|
13 # This code has no warrany whatsoever. |
|
14 # Do what you like with this code as long as you |
|
15 # leave this copyright in place. |
|
16 # |
|
17 # $Id$ |
|
18 |
|
19 if nargin<4 |
|
20 connect= 8; |
|
21 end |
|
22 |
|
23 [jnk,idx]= bwfill( ~im, cols,rows, connect ); |
|
24 |
|
25 imout= zeros( size(jnk) ); |
|
26 imout( idx ) = 1; |
|
27 |
|
28 # |
|
29 # $Log$ |
|
30 # Revision 1.1 2002/03/17 02:38:52 aadler |
|
31 # fill and edge detection operators |
|
32 # |
|
33 # Revision 1.1 1999/06/08 17:06:01 aadler |
|
34 # Initial revision |
|
35 # |
|
36 # |
|
37 |