bwhitmiss() - Image Processing
BW2 = bwhitmiss(BW1,SE1,SE2) performs
the hit-miss operation defined by the structuring elements SE1 and SE2.
The hit-miss operation preserves pixels whose neighborhoods match
the shape of SE1 and don't match the shape of SE2. SE1 and SE2 can
be flat structuring element objects, created by strel,
or neighborhood arrays. The neighborhoods of SE1 and SE2 should
not have any overlapping elements. The syntax bwhitmiss(BW1,SE1,SE2) is
equivalent to imerode(BW1,SE1) & imerode(~BW1,SE2).BW2 = bwhitmiss(BW1,INTERVAL) performs
the hit-miss operation defined in terms of a single array, called
an interval. An interval is an array whose elements
can contain 1, 0, or -1.
The 1-valued elements make up the domain of SE1,
the -1-valued elements make up the domain of SE2,
and the 0-valued elements are ignored. The syntax bwhitmiss(BW1,INTERVAL) is
equivalent to bwhitmiss(BW1,INTERVAL == 1, INTERVAL
== -1).
Syntax
BW2 = bwhitmiss(BW1,SE1,SE2)BW2 = bwhitmiss(BW1,INTERVAL)
Example
bw = [0 0 0 0 0 0
0 0 1 1 0 0
0 1 1 1 1 0
0 1 1 1 1 0
0 0 1 1 0 0
0 0 1 0 0 0]
interval = [0 -1 -1
1 1 -1
0 1 0];
bw2 = bwhitmiss(bw,interval)
bw2 =
0 0 0 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
Output / Return Value
Limitations
Alternatives / See Also
Reference