HALCON Reference Manual 10.0.2
Table of Contents / Filters / Smoothing ClassesClassesClasses | | | Operators

gauss_imagegauss_imagegauss_imageGaussImageGaussImage (Operator)

Name

gauss_imagegauss_imagegauss_imageGaussImageGaussImage — Smooth using discrete gauss functions.

Signature

gauss_image(Image : ImageGauss : Size : )

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

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

Herror gauss_image(Hobject Image, Hobject* ImageGauss, const HTuple& Size)

HImage HImage::GaussImage(const HTuple& Size) const

HImageArray HImageArray::GaussImage(const HTuple& Size) const

void HOperatorSetX.GaussImage(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*ImageGauss, [in] VARIANT Size)

IHImageX* HImageX.GaussImage([in] Hlong Size)

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

HImage HImage.GaussImage(int size)

Description

The operator gauss_imagegauss_imagegauss_imageGaussImageGaussImage smoothes images using the discrete Gaussian. The smoothing effect increases with increasing filter size. The following filter sizes (SizeSizeSizeSizesize) are supported (the sigma value of the gauss function is indicated in brackets):

    3    (0.65)
    5    (0.87)
    7    (1.43)
    9    (1.88)
    11   (2.31)

For border treatment the gray values of the images are reflected at the image borders.

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

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

Attention

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

Parallelization

Parameters

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

Image to be smoothed.

ImageGaussImageGaussImageGaussImageGaussimageGauss (output_object)  (multichannel-)image(-array) objectHImageHImageHImageXHobject * (byte / int2 / uint2 / int4 / real)

Filtered image.

SizeSizeSizeSizesize (input_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Required filter size.

Default value: 5

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

Example (HDevelop)

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

Example (C)

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

Example (HDevelop)

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

Example (HDevelop)

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

Example (HDevelop)

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

Complexity

For each pixel: O(Size * 2).

Result

If the parameter values are correct the operator gauss_imagegauss_imagegauss_imageGaussImageGaussImage 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>)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_imageread_imageReadImageReadImage, grab_imagegrab_imagegrab_imageGrabImageGrabImage

Possible Successors

regiongrowingregiongrowingregiongrowingRegiongrowingRegiongrowing, thresholdthresholdthresholdThresholdThreshold, sub_imagesub_imagesub_imageSubImageSubImage, dyn_thresholddyn_thresholddyn_thresholdDynThresholdDynThreshold, auto_thresholdauto_thresholdauto_thresholdAutoThresholdAutoThreshold

Alternatives

binomial_filterbinomial_filterbinomial_filterBinomialFilterBinomialFilter, smooth_imagesmooth_imagesmooth_imageSmoothImageSmoothImage, derivate_gaussderivate_gaussderivate_gaussDerivateGaussDerivateGauss, isotropic_diffusionisotropic_diffusionisotropic_diffusionIsotropicDiffusionIsotropicDiffusion

See also

mean_imagemean_imagemean_imageMeanImageMeanImage, anisotropic_diffusionanisotropic_diffusionanisotropic_diffusionAnisotropicDiffusionAnisotropicDiffusion, sigma_imagesigma_imagesigma_imageSigmaImageSigmaImage, gen_lowpassgen_lowpassgen_lowpassGenLowpassGenLowpass

Module

Foundation


Table of Contents / Filters / Smoothing ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH