gauss_filtergauss_filterGaussFilterGaussFiltergauss_filter (算子名称)

名称

gauss_filtergauss_filterGaussFilterGaussFiltergauss_filter — Smooth using discrete Gauss functions.

参数签名

gauss_filter(Image : ImageGauss : Size : )

Herror gauss_filter(const Hobject Image, Hobject* ImageGauss, const Hlong Size)

Herror T_gauss_filter(const Hobject Image, Hobject* ImageGauss, const Htuple Size)

void GaussFilter(const HObject& Image, HObject* ImageGauss, const HTuple& Size)

HImage HImage::GaussFilter(Hlong Size) const

static void HOperatorSet.GaussFilter(HObject image, out HObject imageGauss, HTuple size)

HImage HImage.GaussFilter(int size)

def gauss_filter(image: HObject, size: int) -> HObject

描述

该算子 gauss_filtergauss_filterGaussFilterGaussFilterGaussFiltergauss_filter smoothes images using the discrete Gaussian, a discrete approximation of the Gaussian function,

The smoothing effect increases with increasing filter size. The following filter sizes (SizeSizeSizeSizesizesize) are supported (the sigma value of the Gauss function is indicated in brackets): 3 (0.600) 5 (1.075) 7 (1.550) 9 (2.025) 11 (2.550) For border treatment the gray values of the images are reflected at the image borders. Notice that, contrary to 该算子 gauss_imagegauss_imageGaussImageGaussImageGaussImagegauss_image, the relationship between the filter mask size and its respective value for the sigma parameter is linear.

该算子 binomial_filterbinomial_filterBinomialFilterBinomialFilterBinomialFilterbinomial_filter can be used as an alternative to gauss_filtergauss_filterGaussFilterGaussFilterGaussFiltergauss_filter. binomial_filterbinomial_filterBinomialFilterBinomialFilterBinomialFilterbinomial_filter is significantly faster than gauss_filtergauss_filterGaussFilterGaussFilterGaussFiltergauss_filter. It should be noted that the mask size in binomial_filterbinomial_filterBinomialFilterBinomialFilterBinomialFilterbinomial_filter does not lead to the same amount of smoothing as the mask size in gauss_filtergauss_filterGaussFilterGaussFilterGaussFiltergauss_filter. Corresponding mask sizes can be determined based on the respective values of the Gaussian smoothing parameter sigma.

gauss_filtergauss_filterGaussFilterGaussFilterGaussFiltergauss_filter can be executed on OpenCL devices for all supported image types. However, the OpenCL implementation can produce slightly different results from the scalar implementation.

For an explanation of the concept of smoothing filters see the introduction of chapter Filters / Smoothing.

注意

In order to be able to process gauss_filtergauss_filterGaussFilterGaussFilterGaussFiltergauss_filter on an OpenCL device, ImageImageImageImageimageimage must be at least 64 pixels in both width and height.

Note that filter operators may return unexpected results if an image with a reduced domain is used as input. Please refer to the chapter 过滤器.

运行信息

参数表

ImageImageImageImageimageimage (input_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte* / int2* / uint2* / int4* / real*) *allowed for compute devices

Image to be smoothed.

ImageGaussImageGaussImageGaussImageGaussimageGaussimage_gauss (output_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject * (byte / int2 / uint2 / int4 / real)

Filtered image.

SizeSizeSizeSizesizesize (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Required filter size.

Default: 5

List of values: 3, 5, 7, 9, 11

例程 (HDevelop)

gauss_filter(Input,Gauss,7)
regiongrowing(Gauss,Segments,7,7,5,100)

例程 (C)

gauss_filter(Input,&Gauss,7,);
regiongrowing(Gauss,&Segments,7,7,5,100,);

例程 (HDevelop)

gauss_filter(Input,Gauss,7)
regiongrowing(Gauss,Segments,7,7,5,100)

例程 (HDevelop)

gauss_filter(Input,Gauss,7)
regiongrowing(Gauss,Segments,7,7,5,100)

例程 (HDevelop)

gauss_filter(Input,Gauss,7)
regiongrowing(Gauss,Segments,7,7,5,100)

Complexity

For each pixel: O(Size * 2).

结果

If the parameter values are correct 该算子 gauss_filtergauss_filterGaussFilterGaussFilterGaussFiltergauss_filter 返回值 2 ( H_MSG_TRUE) . The behavior in case of empty input (no input images available) is set via 该算子 set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>). If necessary an exception is raised.

可能的前置算子

read_imageread_imageReadImageReadImageReadImageread_image, grab_imagegrab_imageGrabImageGrabImageGrabImagegrab_image

可能的后置算子

regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, thresholdthresholdThresholdThresholdThresholdthreshold, sub_imagesub_imageSubImageSubImageSubImagesub_image, dyn_thresholddyn_thresholdDynThresholdDynThresholdDynThresholddyn_threshold, auto_thresholdauto_thresholdAutoThresholdAutoThresholdAutoThresholdauto_threshold

可替代算子

binomial_filterbinomial_filterBinomialFilterBinomialFilterBinomialFilterbinomial_filter, smooth_imagesmooth_imageSmoothImageSmoothImageSmoothImagesmooth_image, derivate_gaussderivate_gaussDerivateGaussDerivateGaussDerivateGaussderivate_gauss, isotropic_diffusionisotropic_diffusionIsotropicDiffusionIsotropicDiffusionIsotropicDiffusionisotropic_diffusion

参考其它

mean_imagemean_imageMeanImageMeanImageMeanImagemean_image, anisotropic_diffusionanisotropic_diffusionAnisotropicDiffusionAnisotropicDiffusionAnisotropicDiffusionanisotropic_diffusion, sigma_imagesigma_imageSigmaImageSigmaImageSigmaImagesigma_image, gen_lowpassgen_lowpassGenLowpassGenLowpassGenLowpassgen_lowpass

模块

Foundation