remove_noise_region🔗
Short description🔗
remove_noise_region — Remove noise from a region.
Signature🔗
remove_noise_region( region InputRegion, out region OutputRegion, string Type )
Description🔗
remove_noise_region removes noise from a region.
Depending on Type 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.
Execution information🔗
Execution information
-
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
-
Multithreading scope: global (may be called from any thread).
-
Automatically parallelized on tuple level.
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: 'n_4'
List of values: 'n_4', 'n_48', 'n_8'
Complexity🔗
Let \(F\) be the area of the input region. Then the runtime complexity is \(O(\sqrt{F} * 4)\).
Result🔗
remove_noise_region returns 2 (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 is raised.
Combinations with other operators🔗
Combinations
Possible predecessors
connection, regiongrowing, pouring, class_ndim_norm
Possible successors
See also
Module🔗
Foundation