Presentation is loading. Please wait.

Presentation is loading. Please wait.

Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 1/49 Signal- und Bildverarbeitung, 323.014 silently converted to:

Similar presentations


Presentation on theme: "Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 1/49 Signal- und Bildverarbeitung, 323.014 silently converted to:"— Presentation transcript:

1 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 1/49 Signal- und Bildverarbeitung, 323.014 silently converted to: Image Analysis and Processing Arjan Kuijper 19.10.2006 Johann Radon Institute for Computational and Applied Mathematics (RICAM) Austrian Academy of Sciences Altenbergerstraße 56 A-4040 Linz, Austria arjan.kuijper@oeaw.ac.at

2 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 2/49 Summary of the previous week The Gaussian kernel... –is normalized –can be cascaded –can be made dimensionless using 'natural coordinates'. –is the 'blurred version' of the Dirac Delta function. –is the results of the central limit theorem –is anisotropic if the scales are different for the different dimensions. –acts as a low-pass filter in Fourier space. –is described by the diffusion equation Many functions can not be differentiated. –The solution, due to Schwartz, is to regularize the data by convolving them with a smooth test function. –Taking the derivative of this 'observed' function is then equivalent to convolving with the derivative of the test function. A well know variational form of regularization is given by the so- called Tikhonov regularization. –A functional is minimized in sense with the constraint of well behaving derivatives. –Tikhonov regularization with inclusion of the proper behavior of all derivatives is essentially equivalent to Gaussian blurring.

3 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 3/49 Today Gaussian derivatives Natural limits on observations Deblurring Gaussian blur Multiscale derivatives: implementations

4 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 4/49 Gaussian derivatives Shape and algebraic structure Gaussian derivatives in the Fourier domain Zero crossings of Gaussian derivative functions The correlation between Gaussian derivatives Discrete Gaussian kernels Other families of kernels Taken from B. M. ter Haar Romeny, Front-End Vision and Multi-scale Image Analysis, Dordrecht, Kluwer Academic Publishers, 2003. Chapter 4

5 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 5/49 Shape and algebraic structure When we take derivatives to x (spatial derivatives) of the Gaussian function repetitively, we see a pattern emerging of a polynomial of increasing order, multiplied with the original (normalized) Gaussian function again.

6 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 6/49 Hermite polynomials The Gaussian function itself is a common element of all higher order derivatives. These polynomials are closely related to the Hermite polynomials:

7 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 7/49 Gaussian envelope The amplitude of the Hermite polynomials explodes for large x, but the Gaussian envelope suppresses any polynomial function.

8 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 8/49 Gaussian envelope Due to the limiting extent of the Gaussian window function, the amplitude of the Gaussian derivative function can be negligible at the location of the larger zeros. NB: The Gaussian derivatives are not normalized.

9 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 9/49 Orthogonal functions The Hermite polynomials belong to the family of orthogonal functions on R w.r.t. their weight function For n, m 0…3: This does not hold for the Gaussian derivatives:

10 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 10/49 Fourier domain The Fourier transform of the derivative of a function is (-  ) times the Fourier transform of the function.

11 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 11/49 Zero crossings of Gaussian derivative functions We can define the 'width' of a Gaussian derivative function as the distance to the outermost zero- crossing. Only an estimation of the exact analytic solution can be given.

12 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 12/49 The correlation between Gaussian derivatives Higher order Gaussian derivative kernels tend to become more and more similar. the correlation coefficient r between two Gaussian derivatives of order n and m:

13 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 13/49 Correlation How does it look like:

14 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 14/49 Correlation For n,m 0…4 in Fourier space: The correlation is unity when n=m, as expected, is negative when n-m=2, and is positive when n-m=4, and is complex otherwise. Recall:

15 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 15/49 Correlation The correlation coefficient between a Gaussian derivative function and its even neighbour up quite quickly tends to unity for high differential order: (taking the absolute value) Gaussian derivatives are not suitable as a basis.

16 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 16/49 Discrete Gaussian kernels The optimal kernel for the discretized Gaussian kernel is " normalized modified Bessel function of the first kind". This function is almost equal to the Gaussian kernel for  >1.

17 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 17/49 Other families of kernels: Gabor Add constraints: specific frequency: This gives the Gabor family of receptive fields In real space:

18 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 18/49 Other constraints:  scale space Relax the seperability constraint (the power 2 in Fourier space) filter PDE: Taken from the PhD thesis of R. Duits  ¡ 1 ( e ¡ k  k 2  )  ¡ 1 ( e ¡ k  k  )  ¡ 1 ( e ¡ k  k 2 ®  )

19 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 19/49 Poisson scale space A comparison for  = ½ (Poission kernel) and  = 1 (Gaussian kernel): Taken from the PhD thesis of R. Duits

20 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 20/49  scale space A comparison for  = ½, ¾, 1: Taken from the PhD thesis of R. Duits

21 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 21/49 Summary The Gaussian derivatives are characterized by the product of a polynomial function, the Hermite polynomial, and a Gaussian kernel. The order of the Hermite polynomial is the same as the differential order of the Gaussian derivative. Gaussian derivatives are not orthogonal kernels. The Gaussian kernel is a special case of the Gabor kernels. The Gaussian scale space is a special case of the  scale spaces.

22 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 22/49 19.10.2006 : Gaussian derivatives, Natural limits on observations, deblurring, implementations Taken from B. M. ter Haar Romeny, Front-End Vision and Multi-scale Image Analysis, Dordrecht, Kluwer Academic Publishers, 2003. Chapter 7

23 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 23/49 Scale limit For a given order of differentiation there is a limiting scale-size below which the results are no longer exact. The value of the derivative starts to deviate for scales smaller than  = 0.6.

24 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 24/49 Scale In the Fourier domain leakage (aliasing) occurs

25 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 25/49 Leakage Leakage occurs for small scales: Error measure:

26 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 26/49 Accuracy & order Relation between scale , order of differentiation n, and accepted error (left: 5%, right 1, 5, and 10%):

27 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 27/49 Limits Data: There is a limit to the order of differentiation for a given scale of operator and required accuracy. The limit is due to the no longer 'fitting' of the Gaussian derivative kernel in its Gaussian envelop, known as aliasing.

28 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 28/49 19.10.2006 : Gaussian derivatives, limits, deblurring, implementations

29 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 29/49 Deblurring Gaussian blur Modeling Wiener Filter Deblurring with a scale-space approach Taken from A. Kuijper, Image Restoration in Forensic Research using Minimal Total Variation and Maximum Entropy, M.Sc. Thesis, 1995. B. M. ter Haar Romeny, Front-End Vision and Multi-scale Image Analysis, Dordrecht, Kluwer Academic Publishers, 2003. Chapter 16

30 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 30/49 Model Suppose we know our obtained image is blurred by some convolution: g = a(f) Reconstruction is easy: (especially in Fourier Space) isn’t it? No F = A ¡ 1 G

31 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 31/49 Noise Problem 1: The blurring kernel can become infinitesimally small, so we get division by zero Solution 1: Use the complex conjugacy: F = 1 A G F = A ¤ A ¤ A G = A ¤ j A j 2 G

32 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 32/49 Wiener Filter Problem 2: Actually, there is always noise: Solution 2: regularize the filter: This is the Wiener filter, R = signal-to-noise ratio. Max at “A=R” Demo g = a ( f ) + n F = A ¤ j A j 2 + R 2 G

33 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 33/49 Why regularizing? Recall last week:

34 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 34/49 Deblurring with a scale-space approach We create a Taylor series expansion of the scale-space L(x,y,t) to third order around the point t=0: Use the diffusion equation

35 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 35/49 Choosing the right scale For deblurring, a negative time is taken. The estimated blur is  est. The kernel size is  operator. The total deblurring distance is Note: It is a well known fact in image processing that subtraction of the Laplacian (times some constant depending on the blur) sharpens the image. This is the first order Taylor approximation!

36 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 36/49 Result

37 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 37/49 With noise:

38 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 38/49 Summary With a model of the blur (and noise), one can try to deblur images. Deblurring is instable, and can only be carried out analytically when no data is lost, for example through finite intensity representation (8 bit), noise of other pixel errors. The Wiener Filter traditionally does a good job, but requires estimation of a parameter. Deblurring can also be done by expanding the scale space of a blurred image into the negative scale direction by means of a Taylor expansion. It avoids Fourier transforms.

39 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 39/49 19.10.2006 : Gaussian derivatives, limits, deblurring, implementations

40 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 40/49 Implementations Implementation in the spatial domain Separable implementation Implementation in the Fourier domain Boundaries Taken from B. M. ter Haar Romeny, Front-End Vision and Multi-scale Image Analysis, Dordrecht, Kluwer Academic Publishers, 2003. Chapter 5

41 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 41/49 Implementation in the spatial domain In the spatial domain, the Gaussian is to be sampled. A sample range from +/- 4  suffices. The larger scale is chosen, the larger this kernel becomes. Truncation order is O(10 -5 ). The higher the order of differentiation, the higher the error becomes. Beware of the convolution rules your programming language uses!

42 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 42/49 Separable implementation The fastest implementation exploits the separability of the Gaussian kernel. –Apply convolution an the matrix representing the image –Transpose the matrix –Apply convolution again –Transpose again.

43 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 43/49 Orders of differentiation 0 1 2 3 4 5

44 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 44/49 Implementation in the Fourier domain The spatial convolutions are not exact. The Gaussian kernel is truncated. A convolution of two functions in the spatial domain is a multiplication of the Fourier transforms of the functions in the Fourier domain, and take the inverse Fourier transform to come back to the spatial domain. The filter is computed with the same size as the image. Beware of the rules of your programming language for built-in Fourier transforms!

45 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 45/49 Boundaries What is a boundary?

46 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 46/49 Boundary effect due to periodicity in the Fourier space:

47 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 47/49 What to choose? Tilling or mirrored tilling? Padding with zero’s? Rule of thumb: tilling & ignore things that are at a distance  of the boundary.

48 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 48/49 In three weeks The differential structure of images –Differential image structure –Isophotes and flowlines –Coordinate systems and transformations –Directional derivatives –First order gauge coordinates –Gauge coordinate invariants: examples Ridge detection Isophote and flowline curvature in gauge coordinates Affine invariant corner detection –A curvature illusion –Second order structure The Hessian matrix and principal curvatures The shape index Principal directions Gaussian and mean curvature Minimal surfaces, zero Gaussian curvature surfaces –Third order image structure: T-junction detection –Fourth order image structure: junction detection –Scale invariance and natural coordinates –Irreducible invariants Tensor notation

49 Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 49/49 For those of my generation http://www.owlnet.rice.edu/~elec431/projects95/lords/wiener.html


Download ppt "Johann Radon Institute for Computational and Applied Mathematics: www.ricam.oeaw.ac.at 1/49 Signal- und Bildverarbeitung, 323.014 silently converted to:"

Similar presentations


Ads by Google