eliminate_speliminate_spEliminateSpEliminateSp (Operator)

Name

eliminate_speliminate_spEliminateSpEliminateSp — Replace values outside of thresholds with average value.

Signature

eliminate_sp(Image : ImageFillSP : MaskWidth, MaskHeight, MinThresh, MaxThresh : )

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)

void EliminateSp(const HObject& Image, HObject* ImageFillSP, const HTuple& MaskWidth, const HTuple& MaskHeight, const HTuple& MinThresh, const HTuple& MaxThresh)

HImage HImage::EliminateSp(Hlong MaskWidth, Hlong MaskHeight, Hlong MinThresh, Hlong MaxThresh) const

static void HOperatorSet.EliminateSp(HObject image, out HObject imageFillSP, HTuple maskWidth, HTuple maskHeight, HTuple minThresh, HTuple maxThresh)

HImage HImage.EliminateSp(int maskWidth, int maskHeight, int minThresh, int maxThresh)

Description

The operator eliminate_speliminate_spEliminateSpEliminateSpEliminateSp replaces all gray values outside the indicated gray value intervals (MinThreshMinThreshMinThreshMinThreshminThresh to MaxThreshMaxThreshMaxThreshMaxThreshmaxThresh) 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 MaskHeightMaskHeightMaskHeightMaskHeightmaskHeight or MaskWidthMaskWidthMaskWidthMaskWidthmaskWidth, the routine uses the next larger odd values instead (this way the center of the filter mask is always explicitly determined).

This operator may return unexpected results if an image with a reduced domain is used as input. Please refer to the chapter Filters.

Execution Information

Parameters

ImageImageImageImageimage (input_object)  (multichannel-)image(-array) objectHImageHImageHobject (byte / uint2)

Input image.

ImageFillSPImageFillSPImageFillSPImageFillSPimageFillSP (output_object)  (multichannel-)image(-array) objectHImageHImageHobject * (byte / uint2)

Smoothed image.

MaskWidthMaskWidthMaskWidthMaskWidthmaskWidth (input_control)  extent.x HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Width of filter mask.

Default value: 3

Suggested values: 3, 5, 7, 9, 11

Typical range of values: 3 ≤ MaskWidth MaskWidth MaskWidth MaskWidth maskWidth ≤ 512 (lin)

Minimum increment: 2

Recommended increment: 2

Restriction: odd(MaskWidth)

MaskHeightMaskHeightMaskHeightMaskHeightmaskHeight (input_control)  extent.y HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Height of filter mask.

Default value: 3

Suggested values: 3, 5, 7, 9, 11

Typical range of values: 3 ≤ MaskHeight MaskHeight MaskHeight MaskHeight maskHeight ≤ 512 (lin)

Minimum increment: 2

Recommended increment: 2

Restriction: odd(MaskHeight)

MinThreshMinThreshMinThreshMinThreshminThresh (input_control)  integer HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Minimum gray value.

Default value: 1

Suggested values: 1, 5, 7, 9, 11, 15, 23, 31, 43, 61, 101

MaxThreshMaxThreshMaxThreshMaxThreshmaxThresh (input_control)  integer HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Maximum gray value.

Default value: 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_imageDispImageDispImageDispImage

Alternatives

mean_spmean_spMeanSpMeanSpMeanSp, mean_imagemean_imageMeanImageMeanImageMeanImage, median_imagemedian_imageMedianImageMedianImageMedianImage, eliminate_min_maxeliminate_min_maxEliminateMinMaxEliminateMinMaxEliminateMinMax

See also

binomial_filterbinomial_filterBinomialFilterBinomialFilterBinomialFilter, gauss_filtergauss_filterGaussFilterGaussFilterGaussFilter, smooth_imagesmooth_imageSmoothImageSmoothImageSmoothImage, anisotropic_diffusionanisotropic_diffusionAnisotropicDiffusionAnisotropicDiffusionAnisotropicDiffusion, sigma_imagesigma_imageSigmaImageSigmaImageSigmaImage, eliminate_min_maxeliminate_min_maxEliminateMinMaxEliminateMinMaxEliminateMinMax

Module

Foundation