remove_noise_regionremove_noise_regionRemoveNoiseRegionRemoveNoiseRegionRemoveNoiseRegionremove_noise_region removes noise from a region.
Depending on TypeTypeTypeTypetypetype one of the following structuring elements
will be used:
'n_4'
A structuring element consisting of the four
4-neighbors of a point is being used:
.X.
X.X
.X.
'n_8'
A structuring element consisting of the four
8-neighbors of a point is being used:
X.X
...
X.X
'n_48'
A structuring element consisting of the four
4-neighbors and the four 8-neighbors of a point is being used:
XXX
X.X
XXX
A dilation with this structuring element is
performed and the intersection of the result and the input region
is calculated. Thus, all pixels having no according neighbors are
removed.