median_weightedπ
Short descriptionπ
median_weighted β Weighted median filtering with different rank masks.
Signatureπ
median_weighted( image Image, out image ImageWMedian, string MaskType, integer MaskSize )
Descriptionπ
The operator median_weighted calculates the median of
the gray values within a local environment. In contrast to
median_image, which uses all gray values within the
environment exactly once, the operator median_weighted
weights all gray values several times depending on their position.
A gray value is received into the field to be sorted several times
according to its weighting. The following masks are available:
The operator median_weighted means that, contrary to
median_image, gray value corners remain.
For an explanation of the concept of smoothing filters see the introduction of chapter Filters / Smoothing.
Attentionπ
Note that filter operators may return unexpected results if an image with a reduced domain is used as input. Please refer to the chapter Filters.
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.
-
Automatically parallelized on channel level.
-
Automatically parallelized on domain level.
Parametersπ
Image (input_object) (multichannel-)image(-array) β object (byte / int2 / uint2)
Image to be filtered.
ImageWMedian (output_object) (multichannel-)image(-array) β object (byte / int2 / uint2)
Median filtered image.
MaskType (input_control) string β (string)
Type of median mask.
Default: 'inner'
List of values: 'gauss', 'inner'
MaskSize (input_control) integer β (integer)
mask size.
Default: 3
List of values: 3
Exampleπ
(HDevelop)
read_image(Image,'fabrik')
median_weighted(Image,MedianWeighted,'gauss',3)
dev_display(MedianWeighted)
(C)read_image(&Image,"fabrik")\;
median_weighted(Image,&MedianWeighted,"gauss",3)\;
disp_image(MedianWeighted,WindowHandle)\;
Complexityπ
For each pixel: \(O(F * \log{F})\) with F = area of MaskType.
Combinations with other operatorsπ
Combinations
Possible predecessors
Possible successors
threshold, dyn_threshold, regiongrowing
Alternatives
Referencesπ
R. Haralick, L. Shapiro; βComputer and Robot Visionβ; Addison-Wesley, 1992, Seite 319
Moduleπ
Foundation