HALCON Reference Manual 10.0.2
Table of Contents / Image / Features ClassesClassesClasses | | | Operators

estimate_noiseestimate_noiseestimate_noiseEstimateNoiseEstimateNoise (Operator)

Name

estimate_noiseestimate_noiseestimate_noiseEstimateNoiseEstimateNoise — Estimate the image noise from a single image.

Signature

estimate_noise(Image : : Method, Percent : Sigma)

Herror estimate_noise(const Hobject Image, const char* Method, double Percent, double* Sigma)

Herror T_estimate_noise(const Hobject Image, const Htuple Method, const Htuple Percent, Htuple* Sigma)

Herror estimate_noise(Hobject Image, const HTuple& Method, const HTuple& Percent, double* Sigma)

Herror estimate_noise(Hobject Image, const HTuple& Method, const HTuple& Percent, HTuple* Sigma)

double HImage::EstimateNoise(const HTuple& Method, const HTuple& Percent) const

HTuple HImageArray::EstimateNoise(const HTuple& Method, const HTuple& Percent) const

void HOperatorSetX.EstimateNoise(
[in] IHUntypedObjectX* Image, [in] VARIANT Method, [in] VARIANT Percent, [out] VARIANT* Sigma)

VARIANT HImageX.EstimateNoise(
[in] BSTR Method, [in] VARIANT Percent)

static void HOperatorSet.EstimateNoise(HObject image, HTuple method, HTuple percent, out HTuple sigma)

HTuple HImage.EstimateNoise(string method, HTuple percent)

double HImage.EstimateNoise(string method, double percent)

Description

The operator estimate_noiseestimate_noiseestimate_noiseEstimateNoiseEstimateNoise estimates the standard deviation of additive noise within the domain of the image that is passed in ImageImageImageImageimage. The standard deviation is returned in SigmaSigmaSigmaSigmasigma.

The operator is useful in the following use cases:

To estimate the noise, one of the following four methods can be selected in MethodMethodMethodMethodmethod:

Note that the methods 'foerstner'"foerstner""foerstner""foerstner""foerstner" and 'immerkaer'"immerkaer""immerkaer""immerkaer""immerkaer" assume a Gaussian distribution of the image noise, whereas the methods 'least_squares'"least_squares""least_squares""least_squares""least_squares" and'mean'"mean""mean""mean""mean" can be applied to images with arbitrarily distributed noise. In general, the method 'foerstner'"foerstner""foerstner""foerstner""foerstner" returns the most accurate results while the method 'immerkaer'"immerkaer""immerkaer""immerkaer""immerkaer" shows the fastest computation.

If the image noise could not be estimated reliably, the error 3175 is raised. This may happen if the image does not contain enough homogeneous regions, if the image was artificially created, or if the noise is not of Gaussian type. In order to avoid this error, it might be useful in some cases to try one of the following modifications in dependence of the estimation method that is passed in MethodMethodMethodMethodmethod:

Parallelization

Parameters

ImageImageImageImageimage (input_object)  image(-array) objectHImageHImageHImageXHobject (byte / uint2)

Input image.

MethodMethodMethodMethodmethod (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Method to estimate the image noise.

Default value: 'foerstner' "foerstner" "foerstner" "foerstner" "foerstner"

List of values: 'foerstner'"foerstner""foerstner""foerstner""foerstner", 'immerkaer'"immerkaer""immerkaer""immerkaer""immerkaer", 'least_squares'"least_squares""least_squares""least_squares""least_squares", 'mean'"mean""mean""mean""mean"

PercentPercentPercentPercentpercent (input_control)  number HTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong)

Percentage of used image points.

Default value: 20

Suggested values: 1, 2, 5, 7, 10, 15, 20, 30, 40, 50

Restriction: (0 < Percent) && (Percent <= 50.)

SigmaSigmaSigmaSigmasigma (output_control)  real(-array) HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Standard deviation of the image noise.

Assertion: Sigma >= 0

Example (HDevelop)

read_image (Image, 'combine')
estimate_noise (ImageNoise, 'foerstner', 20, SigmaFoerstner)
estimate_noise (ImageNoise, 'immerkaer', 20, SigmaImmerkaer)
estimate_noise (ImageNoise, 'least_squares', 20, SigmaLeastSquares)
estimate_noise (ImageNoise, 'mean', 20, SigmaMean)

Result

If the parameters are valid, the operator estimate_noiseestimate_noiseestimate_noiseEstimateNoiseEstimateNoise returns the value 2 (H_MSG_TRUE). If necessary an exception is raised. If the image noise could not be estimated reliably, the error 3175 is raised.

Possible Predecessors

grab_imagegrab_imagegrab_imageGrabImageGrabImage, grab_image_asyncgrab_image_asyncgrab_image_asyncGrabImageAsyncGrabImageAsync, read_imageread_imageread_imageReadImageReadImage, reduce_domainreduce_domainreduce_domainReduceDomainReduceDomain

Possible Successors

binomial_filterbinomial_filterbinomial_filterBinomialFilterBinomialFilter, gauss_imagegauss_imagegauss_imageGaussImageGaussImage, mean_imagemean_imagemean_imageMeanImageMeanImage, smooth_imagesmooth_imagesmooth_imageSmoothImageSmoothImage

Alternatives

noise_distribution_meannoise_distribution_meannoise_distribution_meanNoiseDistributionMeanNoiseDistributionMean, intensityintensityintensityIntensityIntensity, min_max_graymin_max_graymin_max_grayMinMaxGrayMinMaxGray

See also

gauss_distributiongauss_distributiongauss_distributionGaussDistributionGaussDistribution, add_noise_distributionadd_noise_distributionadd_noise_distributionAddNoiseDistributionAddNoiseDistribution

References

W. Förstner: “Image Preprocessing for Feature Extraction in Digital Intensity, Color and Range Images“, Springer Lecture Notes on Earth Sciences, Summer School on Data Analysis and the Statistical Foundations of Geomatics, 1999
J. Immerkaer: “Fast Noise Variance Estimation“, Computer Vision and Image Understanding, Vol. 64, No. 2, pp. 300-302, 1996

Module

Foundation


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