Remove noise from a region.
::remove_noise_region 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.
|
InputRegion (input_object) |
region(-array) -> Hobject: HRegion(Array) |
| Regions to be modified. | |
|
OutputRegion (output_object) |
region(-array) -> Hobject * : HRegion(Array) |
| Less noisy regions. | |
|
Type (input_control) |
string -> HTuple.char * |
| Mode of noise removal. | |
| Default value: 'n_4' | |
| List of values: 'n_4', 'n_8', 'n_48' | |
Let F be the area of the input region. Then the runtime complexity is O(sqrt(F)*4).
::remove_noise_region returns H_MSG_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 handling is raised.
::connection, ::regiongrowing, ::pouring, ::class_ndim_norm
::dilation1, ::intersection, ::gen_region_points
Region processing