ClassesClassesClassesClasses | | | | Operators

smooth_imagesmooth_imageSmoothImagesmooth_imageSmoothImageSmoothImage (Operator)

Name

smooth_imagesmooth_imageSmoothImagesmooth_imageSmoothImageSmoothImage — Smooth an image using various filters.

Signature

smooth_image(Image : ImageSmooth : Filter, Alpha : )

Herror smooth_image(const Hobject Image, Hobject* ImageSmooth, const char* Filter, double Alpha)

Herror T_smooth_image(const Hobject Image, Hobject* ImageSmooth, const Htuple Filter, const Htuple Alpha)

Herror smooth_image(Hobject Image, Hobject* ImageSmooth, const HTuple& Filter, const HTuple& Alpha)

HImage HImage::SmoothImage(const HTuple& Filter, const HTuple& Alpha) const

HImageArray HImageArray::SmoothImage(const HTuple& Filter, const HTuple& Alpha) const

void SmoothImage(const HObject& Image, HObject* ImageSmooth, const HTuple& Filter, const HTuple& Alpha)

HImage HImage::SmoothImage(const HString& Filter, double Alpha) const

HImage HImage::SmoothImage(const char* Filter, double Alpha) const

void HOperatorSetX.SmoothImage(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*ImageSmooth, [in] VARIANT Filter, [in] VARIANT Alpha)

IHImageX* HImageX.SmoothImage(
[in] BSTR Filter, [in] double Alpha)

static void HOperatorSet.SmoothImage(HObject image, out HObject imageSmooth, HTuple filter, HTuple alpha)

HImage HImage.SmoothImage(string filter, double alpha)

Description

smooth_imagesmooth_imageSmoothImagesmooth_imageSmoothImageSmoothImage smooths gray images using recursive filters originally developed by Deriche and Shen and using the non-recursive Gaussian filter. The following filters can be choosen via the parameter FilterFilterFilterFilterFilterfilter:

             'deriche1', 'deriche2', 'shen' and 'gauss'.
The “filter width” (i.e., the range of the filter and thereby result of the filter) can be of any size. In the case that the Deriche or Shen is choosen it decreases by increasing the filter parameter AlphaAlphaAlphaAlphaAlphaalpha and increases in the case of the Gauss filter (and AlphaAlphaAlphaAlphaAlphaalpha corresponds to the standard deviation of the Gaussian function). An approximation of the appropiate size of the filterwidth AlphaAlphaAlphaAlphaAlphaalpha is performed by the operator info_smoothinfo_smoothInfoSmoothinfo_smoothInfoSmoothInfoSmooth.

Non-recursive filters like the Gaussian filter are often implemented using filter-masks. In this case the runtime of the operator increases with increasing size of the filter mask. The runtime of the recursive filters remains constant; except the border treatment becomes a little bit more time consuming. The Gaussian filter becomes slow in comparison to the recursive ones but is in contrast to them isotropic (the filter 'deriche2' is only weakly direction sensitive). A comparable result of the smoothing is achieved by choosing the following values for the parameter:

            Alpha(deriche2) = Alpha(deriche1) / 2,
            Alpha(shen)     = Alpha(deriche1) / 2,
            Alpha(gauss)    = 1.77 / Alpha(deriche1).

Parallelization

Parameters

ImageImageImageImageImageimage (input_object)  (multichannel-)image(-array) objectHImageHImageHImageHImageXHobject (byte / uint2 / real)

Image to be smoothed.

ImageSmoothImageSmoothImageSmoothImageSmoothImageSmoothimageSmooth (output_object)  (multichannel-)image(-array) objectHImageHImageHImageHImageXHobject * (byte / uint2 / real)

Smoothed image.

FilterFilterFilterFilterFilterfilter (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Filter.

Default value: 'deriche2' "deriche2" "deriche2" "deriche2" "deriche2" "deriche2"

List of values: 'deriche1'"deriche1""deriche1""deriche1""deriche1""deriche1", 'deriche2'"deriche2""deriche2""deriche2""deriche2""deriche2", 'gauss'"gauss""gauss""gauss""gauss""gauss", 'shen'"shen""shen""shen""shen""shen"

AlphaAlphaAlphaAlphaAlphaalpha (input_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Filterparameter: small values cause strong smoothing (vice versa by using bei 'gauss'"gauss""gauss""gauss""gauss""gauss").

Default value: 0.5

Suggested values: 0.1, 0.2, 0.3, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 7.0, 10.0

Typical range of values: 0.01 ≤ Alpha Alpha Alpha Alpha Alpha alpha ≤ 50.0

Minimum increment: 0.01

Recommended increment: 0.1

Restriction: Alpha > 0

Example (HDevelop)

info_smooth('deriche2',0.5,Size,Coeffs)
smooth_image(Input,Smooth,'deriche2',7)

Example (C)

info_smooth('deriche2',0.5,Size,Coeffs);
smooth_image(Input,&Smooth,'deriche2',7);

Example (HDevelop)

info_smooth('deriche2',0.5,Size,Coeffs)
smooth_image(Input,Smooth,'deriche2',7)

Example (HDevelop)

info_smooth('deriche2',0.5,Size,Coeffs)
smooth_image(Input,Smooth,'deriche2',7)

Example (HDevelop)

info_smooth('deriche2',0.5,Size,Coeffs)
smooth_image(Input,Smooth,'deriche2',7)

Example (HDevelop)

info_smooth('deriche2',0.5,Size,Coeffs)
smooth_image(Input,Smooth,'deriche2',7)

Result

If the parameter values are correct the operator smooth_imagesmooth_imageSmoothImagesmooth_imageSmoothImageSmoothImage 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>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If necessary an exception is raised.

Possible Predecessors

read_imageread_imageReadImageread_imageReadImageReadImage

Possible Successors

thresholdthresholdThresholdthresholdThresholdThreshold, dyn_thresholddyn_thresholdDynThresholddyn_thresholdDynThresholdDynThreshold, regiongrowingregiongrowingRegiongrowingregiongrowingRegiongrowingRegiongrowing

Alternatives

binomial_filterbinomial_filterBinomialFilterbinomial_filterBinomialFilterBinomialFilter, gauss_filtergauss_filterGaussFiltergauss_filterGaussFilterGaussFilter, mean_imagemean_imageMeanImagemean_imageMeanImageMeanImage, derivate_gaussderivate_gaussDerivateGaussderivate_gaussDerivateGaussDerivateGauss, isotropic_diffusionisotropic_diffusionIsotropicDiffusionisotropic_diffusionIsotropicDiffusionIsotropicDiffusion

See also

info_smoothinfo_smoothInfoSmoothinfo_smoothInfoSmoothInfoSmooth, median_imagemedian_imageMedianImagemedian_imageMedianImageMedianImage, sigma_imagesigma_imageSigmaImagesigma_imageSigmaImageSigmaImage, anisotropic_diffusionanisotropic_diffusionAnisotropicDiffusionanisotropic_diffusionAnisotropicDiffusionAnisotropicDiffusion

References

R.Deriche: “Fast Algorithms for Low-Level Vision”; IEEE Transactions on Pattern Analysis and Machine Intelligence; PAMI-12, no. 1; S. 78-87; 1990.

Module

Foundation


ClassesClassesClassesClasses | | | | Operators