home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
swCHIP 1991 January
/
swCHIP_95-1.bin
/
demo
/
wit4711
/
lib
/
help
/
morpho
/
bopen.
/
bopen.bin
Wrap
Text File
|
1995-12-09
|
2KB
|
50 lines
OPERATOR
bopen --- binary opening
DESCRIPTION
The bopen operator performs a morphological opening on its binary input image.
An opening is an erosion followed by a dilation. The number of iterations
specified by the niterations parameter determines how many times the erosion
and dilation are executed. The effect of an opening is to smooth objects and
remove isolated pixels.
For example, bopen could be used to remove noise in the form of a single
vertical line through an input image caused by a noisy input channel from
the image collector device:
1) Input: 0 0 0 0 0 0 1 0 Kernel: 1 1 1
0 0 1 0 0 0 1 0
0 1 1 1 1 0 1 0
0 1 1 1 1 1 1 0
0 1 1 1 1 1 1 1
0 0 0 0 1 1 1 1
0 0 0 0 0 1 1 1
0 0 0 0 0 0 1 0
0 0 0 0 0 0 1 0
0 0 0 0 0 0 1 0
Erosion: 0 0 0 0 0 0 0 0 Dilation: 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0
0 0 1 1 1 1 0 0 0 1 1 1 1 1 1 0
0 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1
0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1
0 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The second to last column of the input image contains a vertical line of
noise. After the erosion and dilation have occurred (the equivalent of one
opening), the vertical line is gone and there is only minimal data loss,
namely the pixel in row 2 column 3 has been cleared.