Operators |
sigma_image — Non-linear smoothing with the sigma filter.
sigma_image(Image : ImageSigma : MaskHeight, MaskWidth, Sigma : )
The operator sigma_image carries out a non-linear smoothing of the gray values of all input images (Image). All pixels in a rectangular window (MaskHeight x MaskWidth) are used to determine the new gray value of the central pixel of this window. First, the gray value standard deviation of all pixels in the window is calculated. Then, all pixels of the window with a gray value that differs from the gray value of the central pixel by less than Sigma times this standard deviation are used to calculate the new gray value of the central pixel. The gray value of the central pixel is the average of the gray values of the selected pixels. If no pixel could be selected for the averaging of the gray values, the gray value of the central pixel remains unchanged.
For an explanation of the concept of smoothing filters see the introduction of chapter Filters / Smoothing.
If even values instead of odd values are given for MaskHeight or MaskWidth, the routine uses the next larger odd values instead (this way the center of the filter mask is always explicitly determined).
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.
Image to be smoothed.
Smoothed image.
Height of the mask (number of lines).
Default value: 5
Suggested values: 3, 5, 7, 9, 11, 13, 15
Typical range of values: 3 ≤ MaskHeight ≤ 101
Minimum increment: 2
Recommended increment: 2
Restriction: odd(MaskHeight)
Width of the mask (number of columns).
Default value: 5
Suggested values: 3, 5, 7, 9, 11, 13, 15
Typical range of values: 3 ≤ MaskWidth ≤ 101
Minimum increment: 2
Recommended increment: 2
Restriction: odd(MaskWidth)
Max. deviation to the average.
Default value: 3
Suggested values: 3, 5, 7, 9, 11, 20, 30, 50
Typical range of values: 0 ≤ Sigma ≤ 255
Minimum increment: 1
Recommended increment: 2
read_image(Image,'fabrik') sigma_image(Image,ImageSigma,5,5,3) dev_display(ImageSigma)
For each pixel: O(MaskHeight*MaskWidth).
If the parameter values are correct the operator sigma_image returns the value 2 (H_MSG_TRUE). The behavior in case of empty input (no input images available) is set via the operator set_system('no_object_result',<Result>). If necessary an exception is raised.
threshold, dyn_threshold, regiongrowing
anisotropic_diffusion, rank_image
smooth_image, binomial_filter, gauss_filter, mean_image
R. Haralick, L. Shapiro; “Computer and Robot Vision”; Addison-Wesley, 1992, Seite 325
Foundation
Operators |