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

diff_of_gaussdiff_of_gaussdiff_of_gaussDiffOfGaussDiffOfGauss (Operator)

Name

diff_of_gaussdiff_of_gaussdiff_of_gaussDiffOfGaussDiffOfGauss — Approximate the LoG operator (Laplace of Gaussian).

Signature

diff_of_gauss(Image : DiffOfGauss : Sigma, SigFactor : )

Herror diff_of_gauss(const Hobject Image, Hobject* DiffOfGauss, double Sigma, double SigFactor)

Herror T_diff_of_gauss(const Hobject Image, Hobject* DiffOfGauss, const Htuple Sigma, const Htuple SigFactor)

Herror diff_of_gauss(Hobject Image, Hobject* DiffOfGauss, const HTuple& Sigma, const HTuple& SigFactor)

HImage HImage::DiffOfGauss(const HTuple& Sigma, const HTuple& SigFactor) const

HImageArray HImageArray::DiffOfGauss(const HTuple& Sigma, const HTuple& SigFactor) const

void HOperatorSetX.DiffOfGauss(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*DiffOfGauss, [in] VARIANT Sigma, [in] VARIANT SigFactor)

IHImageX* HImageX.DiffOfGauss(
[in] double Sigma, [in] double SigFactor)

static void HOperatorSet.DiffOfGauss(HObject image, out HObject diffOfGauss, HTuple sigma, HTuple sigFactor)

HImage HImage.DiffOfGauss(double sigma, double sigFactor)

Description

diff_of_gaussdiff_of_gaussdiff_of_gaussDiffOfGaussDiffOfGauss approximates the Laplace-of-Gauss operator by a difference of Gaussians. The standard deviations of these Gaussians can be calculated, according to Marr, from the Parameter SigmaSigmaSigmaSigmasigma of the LoG and the ratio of the two standard deviations (SigFactorSigFactorSigFactorSigFactorsigFactor) as:

sigma1 = Sigma /
         sqrt(-2.0 * log {1.0/SigFactor} / (SigFactor^2 - 1.0))

sigma2 = sigma1 / SigFactor

Result = { Object * gauss(sigma1) } - { Object * gauss(sigma2) }

For a SigFactor = 1.6, according to Marr, an approximation to the Mexican-Hat-Operator results. The resulting image is stored in DiffOfGaussDiffOfGaussDiffOfGaussDiffOfGaussdiffOfGauss.

Parallelization

Parameters

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

Input image

DiffOfGaussDiffOfGaussDiffOfGaussDiffOfGaussdiffOfGauss (output_object)  (multichannel-)image(-array) objectHImageHImageHImageXHobject * (int2)

LoG image.

SigmaSigmaSigmaSigmasigma (input_control)  real HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Smoothing parameter of the Laplace operator to approximate.

Default value: 3.0

Suggested values: 2.0, 3.0, 4.0, 5.0

Typical range of values: 0.2 ≤ Sigma Sigma Sigma Sigma sigma ≤ 50.0

Minimum increment: 0.01

Recommended increment: 0.1

Restriction: Sigma > 0.0

SigFactorSigFactorSigFactorSigFactorsigFactor (input_control)  real HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Ratio of the standard deviations used (Marr recommends 1.6).

Default value: 1.6

Typical range of values: 0.1 ≤ SigFactor SigFactor SigFactor SigFactor sigFactor ≤ 10.0

Minimum increment: 0.01

Recommended increment: 0.1

Restriction: SigFactor > 0.0

Example (HDevelop)

read_image(Image,'fabrik')
diff_of_gauss(Image,Laplace,2.0,1.6)
zero_crossing(Laplace,ZeroCrossings)

Example (C)

read_image(&Image,"mreut");
diff_of_gauss(Image,&Laplace,2.0,1.6);
zero_crossing(Laplace,&ZeroCrossings);

Example (HDevelop)

read_image(Image,'fabrik')
diff_of_gauss(Image,Laplace,2.0,1.6)
zero_crossing(Laplace,ZeroCrossings)

Example (HDevelop)

read_image(Image,'fabrik')
diff_of_gauss(Image,Laplace,2.0,1.6)
zero_crossing(Laplace,ZeroCrossings)

Example (HDevelop)

read_image(Image,'fabrik')
diff_of_gauss(Image,Laplace,2.0,1.6)
zero_crossing(Laplace,ZeroCrossings)

Complexity

The execution time depends linearly on the number of pixels and the size of sigma.

Result

diff_of_gaussdiff_of_gaussdiff_of_gaussDiffOfGaussDiffOfGauss returns 2 (H_MSG_TRUE) if all parameters are correct. If the input is empty the behaviour can be set via 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 Successors

zero_crossingzero_crossingzero_crossingZeroCrossingZeroCrossing, dual_thresholddual_thresholddual_thresholdDualThresholdDualThreshold

Alternatives

laplacelaplacelaplaceLaplaceLaplace, derivate_gaussderivate_gaussderivate_gaussDerivateGaussDerivateGauss

References

D. Marr: “Vision (A computational investigation into human representation and processing of visual information)”; New York, W.H. Freeman and Company; 1982.

Module

Foundation


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