DOC PREVIEW
U of U CS 7960 - 03 The Gaussian kernel

This preview shows page 1-2-3-4-5 out of 15 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 15 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 15 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 15 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 15 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 15 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 15 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

3. The Gaussian kernelOf all things, man is the measure.Protagoras the Sophist (480-411 B.C.)3.1 The Gaussian kernelThe Gaussian (better Gaußian) kernel is named after Carl Friedrich Gauß (1777-1855), abrilliant German mathematician. This chapter discusses many of the attractive and specialproperties of the Gaussian kernel.<< FrontEndVision`FEV`; Show@Import@"Gauss10DM.gif"D, ImageSize -> 280D;Figure 3.1 The Gaussian kernel is apparent on every German banknote of DM 10,- where itis depicted next to its famous inventor when he was 55 years old. The new Euro replacesthese banknotes. See also: http://scienceworld.wolfram.com/biography/Gauss.html.The Gaussian kernel is defined in 1-D, 2D and N-D respectively asG1 DHx; sL =1ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅè!!!!!!!2 p s e-x2ÅÅÅÅÅÅÅÅÅÅÅÅÅ2 s2, G2 DHx, y; sL =1ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2 ps2 e-x2+y2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2 s2, GNDHx”; sL=1ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅIè!!!!!!!2 p sMN e-»x”÷»2ÅÅÅÅÅÅÅÅÅÅÅÅÅ2 s2The s determines the width of the Gaussian kernel. In statistics, when we consider theGaussian probability density function it is called the standard deviation, and the square of it,s2, the variance. In the rest of this book, when we consider the Gaussian as an aperturefunction of some observation, we will refer to s as the inner scale or shortly scale.In the whole of this book the scale can only take positive values, s > 0. In the process ofobservation s can never become zero. For, this would imply making an observation throughan infinitesimally small aperture, which is impossible. The factor of 2 in the exponent is amatter of convention, because we then have a 'cleaner' formula for the diffusion equation, aswe will see later on. The semicolon between the spatial and scale parameters isconventionally put there to make the difference between these parameters explicit. 3. The Gaussian kernel 37The scale-dimension is not just another spatial dimension, as we will thoroughly discuss inthe remainder of this book.The half width at half maximum (s = 2 è!!!!!!!!!!!2 ln 2) is often used to approximate s, but it issomewhat larger: Unprotect@gaussD;gauss@x_, s_D :=1ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅsè!!!!!!!2 p ExpA-x2ÅÅÅÅÅÅÅÅÅÅÅ2 s2E;SolveAgauss@x, sDÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅgauss@0, sD==1ÅÅÅÅ2, xE88x Ø -sè!!!!!!!!!!!!!!!!!!!!2 Log@2D <, 8x Ø sè!!!!!!!!!!!!!!!!!!!!2 Log@2D <<% êê N88x Ø -1.17741 s<, 8x Ø 1.17741 s<<3.2 NormalizationThe term 1ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅè!!!!!!!2 p s in front of the one-dimensional Gaussian kernel is the normalizationconstant. It comes from the fact that the integral over the exponential function is not unity:Ÿ-¶¶e-x2ê2 s2 „ x =è!!!!!!!!2 p s. With the normalization constant this Gaussian kernel is anormalized kernel, i.e. its integral over its full domain is unity for every s. This means that increasing the s of the kernel reduces the amplitude substantially. Let uslook at the graphs of the normalized kernels for s = 0.3, s = 1 and s = 2 plotted on thesame axes:Unprotect@gaussD; gauss@x_, s_D :=1ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅsè!!!!!!!2 p ExpA-x2ÅÅÅÅÅÅÅÅÅÅÅ2 s2E;Block@8$DisplayFunction = Identity<, 8p1, p2, p3< =Plot@gauss@x, s = #D, 8x, -5, 5<, PlotRange -> 80, 1.4<D & êü8.3, 1, 2<D;Show@GraphicsArray@8p1, p2, p3<D, ImageSize -> 400D;-4 -2 2 40.20.40.60.811.2-4 -2 2 40.20.40.60.811.2-4 -2 2 40.20.40.60.811.2Figure 3.2 The Gaussian function at scales s = .3, s = 1 and s = 2. The kernel isnormalized, so the total area under the curve is always unity.The normalization ensures that the average graylevel of the image remains the same whenwe blur the image with this kernel. This is known as average grey level invariance.38 3.1 The Gaussian kernel3.3 Cascade property, selfsimilarityThe shape of the kernel remains the same, irrespective of the s. When we convolve twoGaussian kernels we get a new wider Gaussian with a variance s2 which is the sum of thevariances of the constituting Gaussians: gnewHx”; s12+ s22L = g1Hx”; s12L ≈ g2Hx”; s22L. s =.; SimplifyA‡-¶¶gauss@a, s1D gauss@a - x, s2D „ a, 8s1> 0, s2> 0<E‰-x2ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2 Is12+s22MÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅè!!!!!!!2 pè!!!!!!!!!!!!!!!s12+ s22This phenomenon, i.e. that a new function emerges that is similar to the constitutingfunctions, is called self-similarity. The Gaussian is a self-similar function. Convolution with a Gaussian is a linear operation, soa convolution with a Gaussian kernel followed by a convolution with again a Gaussiankernel is equivalent to convolution with the broader kernel. Note that the squares of s add,not the s's themselves. Of course we can concatenate as many blurring steps as we want tocreate a larger blurring step. With analogy to a cascade of waterfalls spanning the sameheight as the total waterfall, this phenomenon is also known as the cascade smoothingproperty.Famous examples of self-similar functions are fractals. This shows the famous Mandelbrotfractal:cMandelbrot = Compile@88c, _Complex<<, -Length@FixedPointList@#2+ c &, c, 50, SameTest -> HAbs@#2D > 2.0 &LDDD;ListDensityPlot@ -Table@cMandelbrot@a + b ID, 8b, -1.1, 1.1, 0.0114<,8a, -2.0, 0.5, 0.0142<D, Mesh -> False, AspectRatio -> Automatic,Frame -> False, ColorFunction -> Hue, ImageSize -> 170D;Figure 3.3 The Mandelbrot fractal is a famous example of a self-similar function. Source:www.mathforum.org. See also mathworld.wolfram.com/MandelbrotSet.html.3. The Gaussian kernel 393.4 The scale parameterIn order to avoid the summing of squares, one often uses the following parametrization:2 s2Ø t, so the Gaussian kernel get a particular short form. In Ndimensions:GNDHx”, tL =1ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅHp tLN ê2 e-x2ÅÅÅÅÅÅÅÅt. It is this t that emerges in the diffusion equation ∑ LÅÅÅÅÅÅÅ∑t=∑2LÅÅÅÅÅÅÅÅÅÅ∑x2+∑2LÅÅÅÅÅÅÅÅÅÅ∑y2+∑2LÅÅÅÅÅÅÅÅÅÅ∑ z2. It is often referredto as 'scale' (like in: differentiation


View Full Document
Download 03 The Gaussian kernel
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view 03 The Gaussian kernel and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view 03 The Gaussian kernel 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?