eliminate_speliminate_spEliminateSpEliminateSpeliminate_sp (Operator)
Name
eliminate_speliminate_spEliminateSpEliminateSpeliminate_sp
— Replace values outside of thresholds with average value.
Signature
Herror eliminate_sp(const Hobject Image, Hobject* ImageFillSP, const Hlong MaskWidth, const Hlong MaskHeight, const Hlong MinThresh, const Hlong MaxThresh)
Herror T_eliminate_sp(const Hobject Image, Hobject* ImageFillSP, const Htuple MaskWidth, const Htuple MaskHeight, const Htuple MinThresh, const Htuple MaxThresh)
Description
The operator eliminate_speliminate_spEliminateSpEliminateSpEliminateSpeliminate_sp
replaces all gray values outside
the indicated gray value intervals (MinThreshMinThreshMinThreshMinThreshminThreshmin_thresh
to
MaxThreshMaxThreshMaxThreshMaxThreshmaxThreshmax_thresh
) with the neighboring mean values. Only those
neighboring pixels which also fall within the gray value interval
are used for averaging. If no such pixel is present in the vicinity
the original gray value is used. The gray values in the input image
falling within the gray value interval are also adopted without
change.
For an explanation of the concept of smoothing filters see the introduction
of chapter Filters / Smoothing.
Attention
If even values instead of odd values are given for
MaskHeightMaskHeightMaskHeightMaskHeightmaskHeightmask_height
or MaskWidthMaskWidthMaskWidthMaskWidthmaskWidthmask_width
, 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.
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
ImageImageImageImageimageimage
(input_object) (multichannel-)image(-array) →
objectHImageHObjectHImageHobject (byte / uint2)
Input image.
ImageFillSPImageFillSPImageFillSPImageFillSPimageFillSPimage_fill_sp
(output_object) (multichannel-)image(-array) →
objectHImageHObjectHImageHobject * (byte / uint2)
Smoothed image.
MaskWidthMaskWidthMaskWidthMaskWidthmaskWidthmask_width
(input_control) extent.x →
HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Width of filter mask.
Default:
3
Suggested values:
3, 5, 7, 9, 11
Value range:
3
≤
MaskWidth
MaskWidth
MaskWidth
MaskWidth
maskWidth
mask_width
(lin)
Minimum increment:
2
Recommended increment:
2
Restriction:
odd(MaskWidth) && MaskWidth < width(Image) * 2
MaskHeightMaskHeightMaskHeightMaskHeightmaskHeightmask_height
(input_control) extent.y →
HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Height of filter mask.
Default:
3
Suggested values:
3, 5, 7, 9, 11
Value range:
3
≤
MaskHeight
MaskHeight
MaskHeight
MaskHeight
maskHeight
mask_height
(lin)
Minimum increment:
2
Recommended increment:
2
Restriction:
odd(MaskHeight) && MaskHeight < height(Image) * 2
MinThreshMinThreshMinThreshMinThreshminThreshmin_thresh
(input_control) integer →
HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Minimum gray value.
Default:
1
Suggested values:
1, 5, 7, 9, 11, 15, 23, 31, 43, 61, 101
MaxThreshMaxThreshMaxThreshMaxThreshmaxThreshmax_thresh
(input_control) integer →
HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Maximum gray value.
Default:
254
Suggested values:
5, 7, 9, 11, 15, 23, 31, 43, 61, 101, 200, 230, 250, 254
Restriction:
MinThresh <= MaxThresh
Example (HDevelop)
read_image(Image,'mreut')
dev_display(Image)
eliminate_sp(Image,ImageFillSP,3,3,101,201)
dev_display(ImageFillSP)
Example (C)
read_image(&Image,"mreut");
disp_image(Image,WindowHandle);
eliminate_sp(Image,&ImageFillSP,3,3,101,201);
disp_image(ImageFillSP,WindowHandle);
Example (HDevelop)
read_image(Image,'mreut')
dev_display(Image)
eliminate_sp(Image,ImageFillSP,3,3,101,201)
dev_display(ImageFillSP)
Example (HDevelop)
read_image(Image,'mreut')
dev_display(Image)
eliminate_sp(Image,ImageFillSP,3,3,101,201)
dev_display(ImageFillSP)
Example (HDevelop)
read_image(Image,'mreut')
dev_display(Image)
eliminate_sp(Image,ImageFillSP,3,3,101,201)
dev_display(ImageFillSP)
Possible Successors
disp_imagedisp_imageDispImageDispImageDispImagedisp_image
Alternatives
mean_spmean_spMeanSpMeanSpMeanSpmean_sp
,
mean_imagemean_imageMeanImageMeanImageMeanImagemean_image
,
median_imagemedian_imageMedianImageMedianImageMedianImagemedian_image
,
eliminate_min_maxeliminate_min_maxEliminateMinMaxEliminateMinMaxEliminateMinMaxeliminate_min_max
See also
binomial_filterbinomial_filterBinomialFilterBinomialFilterBinomialFilterbinomial_filter
,
gauss_filtergauss_filterGaussFilterGaussFilterGaussFiltergauss_filter
,
smooth_imagesmooth_imageSmoothImageSmoothImageSmoothImagesmooth_image
,
anisotropic_diffusionanisotropic_diffusionAnisotropicDiffusionAnisotropicDiffusionAnisotropicDiffusionanisotropic_diffusion
,
sigma_imagesigma_imageSigmaImageSigmaImageSigmaImagesigma_image
,
eliminate_min_maxeliminate_min_maxEliminateMinMaxEliminateMinMaxEliminateMinMaxeliminate_min_max
Module
Foundation