| HALCON Reference Manual / Filter / Smoothing | Operators |
median_weighted — Weighted median filtering with different rank masks.
median_weighted(Image : ImageWMedian : MaskType, MaskSize : )
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:
'gauss' at MaskSize = 3 1 2 1 2 4 2 1 2 1 'inner' at MaskSize = 3 1 1 1 1 3 1 1 1 1
The operator median_weighted means that, contrary to median_image, gray value corners remain.
| Image (input_object) | (multichannel-)image(-array) → object (byte / int2) |
| Image to be filtered. | |
| ImageWMedian (output_object) | (multichannel-)image(-array) → object (byte / int2) |
| Median filtered image. | |
| MaskType (input_control) | string → (string) |
| Type of median mask. | |
| Default value: 'inner' | |
| List of values: 'inner', 'gauss' | |
| MaskSize (input_control) | integer → (integer) |
| mask size. | |
| Default value: 3 | |
| List of values: 3 | |
read_image(Image,'fabrik') median_weighted(Image,MedianWeighted,'gauss',3) disp_image(MedianWeighted,WindowHandle)
For each pixel: O(F * log(F)) with F = area of MaskType.
median_weighted is reentrant and automatically parallelized (on tuple level, channel level, domain level).
threshold, dyn_threshold, regiongrowing
median_image, trimmed_mean, sigma_image
R. Haralick, L. Shapiro; “Computer and Robot Vision”; Addison-Wesley, 1992, Seite 319
Foundation
| HALCON Reference Manual / Filter / Smoothing | Operators |
| Version 9.0.2 | Copyright © 1996-2010 MVTec Software GmbH |