remove_noise ( InputRegion : OutputRegion : Type : )

Remove noise from a region.

remove_noise removes noise from a region. In mode 'n_4', a structuring element consisting of the four neighbors of a point is generated. 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 4-connected neighbor are removed.


Parameters

InputRegion (input_object)
region(-array) -> object
Regions to be modified.

OutputRegion (output_object)
region(-array) -> object
Less noisy regions.

Type (input_control)
string -> string
Mode of noise removal.
Default value: 'n_4'
List of values: 'n_4', 'n_8', 'n_48'


Complexity

Let F be the area of the input region. Then the runtime complexity is O(sqrt(F)*4).


Result

remove_noise returns TRUE if all parameters are correct. The behavior in case of empty input (no regions given) can be set via set_system(::'no_object_result',<Result>:). If necessary, an exception is raised.


Possible Predecessors

connection, regiongrowing__, pouring, class_ndim1__


Possible Successors

select_shape


See also

dilation1, intersection, store_coord



Copyright © 1996-1997 MVTec Software GmbH