Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Computer Vision Seminar, HUJI, December 2002 PDE-based Image Processing and the Triple Well Potential for Image Sharpening Faculty of Electrical Engineering,

Similar presentations

Presentation on theme: "1 Computer Vision Seminar, HUJI, December 2002 PDE-based Image Processing and the Triple Well Potential for Image Sharpening Faculty of Electrical Engineering,"— Presentation transcript:

1 1 Computer Vision Seminar, HUJI, December 2002 PDE-based Image Processing and the Triple Well Potential for Image Sharpening Faculty of Electrical Engineering, Technion, Haifa, Israel Guy Gilboa A joint work with Nir Sochen & Yehoshua Y. Zeevi.

2 2 Objectives A review on PDE-based methods for image processing. Show relation to energy minimization. Present a new well-shaped potential for image sharpening. Introduce hyper-diffusion for regularization. Examples and conclusion.

3 3 Linear scale-space. Perona-Malik scheme. The intuition behind nonlinear- diffusion filtering. Numerical schemes Basic Linear and Nonlinear Diffusion

4 4 Uncommitted front end vision We know nothing, we have no preference whatsoever The mathematical formulation for that is: Linearity (no knowledge, no model) Spatial shift invariance (no preferred location) Isotropy (no preferred orientation) Scale invariance (no preferred size, or scale)

5 5 Connecting PDEs to Image processing, introducing: The Linear Scale-Space Scale Space is represented by the linear diffusion equation: We add a scale dimension to the original image – using a single scale parameter t. As shown by Koendrink: The diffusion equation is the unique scheme that incorporates all the above requirements (isotropy, homogeneity, causality).

6 6 Linear Scale-Space Applying the diffusion equation to the original image – creating a 3rd dimension t Adopted from [Romeny 96] t

7 7 Pyramid representation Scale-Space representation

8 8 Edge and corner detection of images Adopted from: [Lindeberg-94]

9 9 Application example: edge detection Edge detection at many scales simultaneously, in the 1D case, by zero-crossing of Laplacian. Signal at different scales edges Adopted from: [Witkin-83]

10 10 Linear Diffusion as a LPF The Gaussian is the Greens function of the diffusion equation. In the 1D case we get:

11 11 Diffusion Processes Linear diffusion Non-linear (inhomogeneous diffusion)

12 12 Nonlinear diffusion example – Perona Malik: Smoothing low gradients (mainly noise) Preserving high gradients (singularities and edges).

13 13 Linear diffusion example

14 14 Nonlinear diffusion example

15 15 Intuition for adaptive denoising Diffuse (low-pass-filter) only within the same region \ object. –Therefore -> Slow the diffusion near edges. Do not diffuse the leaves of the tree with the sky at the background [P-M]

16 16 Gaussian averaging along the curve of the signal Adopted from [Sochen et al 01] The distance is measured not only spatially, the values of the signal are also considered. Related to the logic of bilateral filters.

17 17 Relation to robust statistics Reducing the effect of outliers – pixels at the other side of an edge are treated as outliers and should not be considered in the estimation (see Black et al `98).

18 18 Numerics – how do we actually do that ? Reminder from first year Infi course: For images we usually take h=1and simply compute the difference between neighboring pixels: 1 st order: Forward: I i+1,j - I i,j, Backward: I i,j – I i_1,j Central: (I i+1,j – I i-1,j )/2 2 nd order: Central: I i+1,j – 2I i,j + I i-1,j

19 19 Explicit Schemes Computation is done on each pixel separately – using the values of the previous iteration. Example of linear diffusion:

20 20 Explicit scheme – cont Main advantage – simplicity, very easy to implement. Main disadvantage - time constraints (CFL bound): the scheme is stable only when (for 2D) Summary: a very popular scheme (esp. when the process does not need a lot of iterations).

21 21 Perona-Malik example in Matlab function J=diffusion(J,K,N) for i=1:N, % calculate gradient in all directions (N,S,E,W) In=[J(1,:); J(1:Ny-1,:)]-J; Is=[J(2:Ny,:); J(Ny,:)]-J; Ie=[J(:,2:Nx) J(:,Nx)]-J; Iw=[J(:,1) J(:,1:Nx-1)]-J; % calculate diffusion coefficients Cn=exp(-(abs(In)/K).^2); Cs=exp(-(abs(Is)/K).^2); Ce=exp(-(abs(Ie)/K).^2); Cw=exp(-(abs(Iw)/K).^2); J=J+0.2*(Cn.*In + Cs.*Is + Ce.*Ie + Cw.*Iw); end; % for i

22 22 Advanced Schemes Implicit schemes – need to solve for all the pixels together, no time constraints, produces a very large set of equations. Iterative methods are often used (Jacobi, Gauss-Seidel, Multigrid). Level-sets – used for curve evolution (like snakes). Representing a curve as a level set of a higher dimensional function. Scheme is stable, non-parametric, able to change topologies.

23 23 Other PDE-based Processes Coherence-enhanceing diffusion. Total-Variation denoising Beltrami flow color processing Segmentation – Mumford-Shah functional and active contours (snakes).

24 24 Anisotropic diffusion Cottet and Germain, Weickert - coherence enhancing flow: strong diffusion along the edge, weak diffusion across the edge (tensor diffusion coef.).

25 25 Total Variation denoising ( Osher-Rudin-Fatemi) Denoising by minimizing the total variation yet staying close to the input image. Reduces the oscillatory part of the signal that contains mostly noise (but also texture and some small details). Energy to be minimized: f – original image

26 26 TV - does not penalize large gradients (edges) Same energy for any monotone part of the signal, unlike linear diffusion. For L1 norm all the lines on the right has the same energy, whereas for L2 norm the blue line has the highest energy and the red line has the lowest.

27 27 TV vs. PM - a sketchy comparison Top: original+noise(SNR=11.9dB) Bottom: left – TV (SNR=17.6dB) right – PM (SNR=16.9dB) TVPM

28 28 Color processing by Beltrami flow (Sochen, Kimmel, Malladi) Representing color image as a 2D surface in a 5D Riemannian manifold. A surface minimizing process that denoises and preserves edges Evolving each color channel via the Beltrami flow:

29 29 Beltrami flow – examples

30 30 Beltrami flow (cont): denoising JPEG lossy effect – surface rendering of RGB channels.

31 31 Beltrami flow - movies CENSORED see

32 32 Image Segmentation Mumford shah functional Active contours (snakes)

33 33 Mumford-Shah Functional A variational approach for image segmentation. Minimizing the following energy functional: f – original image, u – piece-wise smooth approx. of f separated by the contour – C.

34 34 Active contours (snakes) Evolving a curve like a rubber-band, with the aim to close on the object to be segmented, creating a continuous, smooth curve. Motivation is drawn from the active contour model of Kass et al (87) but rely on level set techniques introduced by Osher and Sethian to handle topological changes in a seamless fashion (introduced independently by Caselles et al. and Malladi et al. in 95-`97, Geodesic Active Contours). E min (C) smooth+elastic+on edges

35 35 Segmentation examples Adpoted from Chan & Vese, UCLA site

36 36 Video Segmentation Adpoted from Julian Jerome ©

37 37 More processes Texture segmentation Smoothing of vector fields Image inpainting (filling missing information) Movies – smoothing, filling frames etc. Knowledge-based segmentation Stereo vision and more..

38 38 Some References 1.Black, M., G. Sapiro, D. Marimont, and D. Heeger, Robust anisotropic diffusion, IEEE Transactions on Image Processing Volume 7, PP 421-432, 1998. 2.V. Caselles, R. Kimmel, and G. Sapiro. Geodesic active contours. International Journal of Computer Vision, 22(1):61-79, 1997.. 3.Chan T, Vese L.A., Image Segmentation Using Level Sets and the Mumford-Shah Model, CAM 00-14, April 2000 4.Chan T, Vese L.A., Active Contours Without Edges, IEEE Image Proc. Feb 2001. 5.Chan T, Shen J., Vese L.A., Variational PDE models in image processing, Amer. Math. Soc. Notice, 50, pp. 14-26, January 2003. 6.G.H. Cottet and L. Germain, Image processing through reaction combined with nonlinear diffusion", Math. Comp., 61 (1993) 659--673. 7.M. Kass, A. Witkin and D. Terzopoulos, "Snakes: Active contour models," International Journal of Computer Vision, pp. 321-331, 1987. 8.R Kimmel, R Malladi and N Sochen, ``Images as Embedding Maps and Minimal Surfaces: Movies, Color, Texture, and Volumetric Medical Images", Int. J. of Computer Vision, 39(2):111-129, Sept. 2000.

39 39 9.R. Malladi, J. A. Sethian and B.C. Vemuri. Shape modeling with front propagation : A level set approach. IEEE Transactions on Pattern Analysis and Machine Intelligence, 17(2):158-175, February 1995. 10.D. Mumford and J. Shah, Optimal approximations by piece-wise smooth functions and assosiated variational problems, Comm. Pure and Appl. Math., LII (1989), 577-685. 11.P. Perona and J. Malik, Scale-space and edge detection using anisotropic diffusion", IEEE Trans. PAMI vol. 12,no. 7, pp. 629-639, 1990. 12.T. Lindeberg, Scale-space theory: a basic tool.., J. App. Statistics, 21(2):223-261, 1994. 13.Rudin L, Osher S and Fatemi C 1992 Nonlinear total variation based noise removal algorithm, Physica D 60, 259-268 (1992). 14.N Sochen, R Kimmel and R Malladi, `A general framework for low level vision", IEEE Trans. on Image Processing, 7, (1998) 310-318. 15.N. Sochen, R. Kimmel, and A.M. Bruckstein. Diffusions and confusions in signal and image processing, Journal of Mathematical Imaging and Vision, 14(3):195-209, 2001. 16.ter Haar Romeney B.M., An Intorduction to Scale-Space Theory, VBC- 96, Hamburg, Germany.

40 40 Books –ter Haar Romeny, Geometry-driven diffusion in computer vision. –Weickert, Anisotropic diffusion in image processing. –Sapiro, Geometric partial differential equations and image analysis. Sites –Ron Kimmels course Numerical Geometry of Images: –My web site: 17.J. Weickert,``Coherence-enhancing diffusion of colour images", Image and Vision Comp., 17 (1999) 199-210. 18. J. Weickert, A review on nonlinear diffusion filtering, LNCS 1252, Scale-Space Theory in Computer Vision, Springer-Verlag, 1997, 3-28. 19.A. P. Witkin, ``Scale space filtering", Proc. Int. Joint Conf. On Artificial Intelligence, pp. 1019-1023, 1983.

41 41 Nonlinear diffusion as an energy minimizing process A general nonlinear diffusion process can be viewed as a steepest descent sequence that minimizes the signals energy. The energy functional E is defined as the cumulative potential (energy density) Ψ of the signal in the domain Ω.

42 42 We define an energy functional E: where Ψ is a potential which is a function of the gradient magnitude. The steepest descent process is:

43 43 Assigning: we get the nonlinear diffusion equation (Perona-Malik style): see - You, Xu, Tannenbaum, Kaveh, IEEE Trans. IP, 5(11), 1996. - Weickert, LNCS 1252, pp.3-28, 1997.

44 44 The nature of the diffusion depends on the potential function ψ (or the corresponding diffusion coefficient c)

45 45 Potentials of several processes

46 46 Diffusion coefficients of several processes

47 47 Reach a global minimum Well-posed processes Strong denoising Edge preservation is weaker Convex Potentials (e.g. linear diffusion, Charbonnier et al., Beltrami)

48 48 Nonconvex Potentials (e.g. Perona-Malik) In general can have many minima (Hollig, You et al.). produce staircasing. Need some sort of regularization to be well-posed (Catte et al). Weaker denoising Strong edge preservation Performs well for images-processing

49 49 forward backward Sharpening by going back in time ?

50 50 Basic sharpening property: gradients should increase (at least in some range). High gradients should cost less energy than medium gradients. Minimum-maximum principle is not kept. Potential requirement for image sharpening blursharpen

51 51 A classical ill posed sharpening process, attempting to reverse forward diffusion (Gaussian blur). Drawbacks: –Oscillatory –Amplifies noise exponentially –Causes the explosion of the signal Inverse diffusion

52 52 1D inverse diffusion example: trying to restore a blurred step.

53 53 Inverse diffusion of a blurred image

54 54 We would like to find a potential function that has a sharpening ability and yet avoids the inverse diffusion drawbacks.

55 55 Rule 1: Low gradients should not be enhanced Avoid amplification of noise Specifically, the zero gradient should be stable –> have minimum energy. Restrictions on the potential - 1

56 56 Rule 2: Very high gradients should not be enhanced Avoid explosion of the signal To reduce staricasing – very high gradients should contribute some positive energy. Restrictions on the potential - 2

57 57 Rule 3: There should be minimal oscilations between low energy states We assume the original image is with little oscillations. Restrictions on the potential - 3

58 58 The triple-well potential IxIx Denoising Sharpening Slow smoothing W(I x ) Sharpening potential W(I x ) in one dimension. Forms the shape of three wells.

59 59 From inverse diffusion to a Forward- and-Backward (FAB) diffusion |grad(U)| C(|grad(U)|) 0 -α 1

60 60 Stability of smooth regions Given M f > M b then for every x 0 : |I x (x 0 ;0)| 0.

61 61 The proposed energy functional for sharpening: where W is a gradient dependent well-shaped potential. F is a fidelity term. R is a high order regularization term.

62 62 Next: We discuss the need for a high order regularization term R. We assign a standard convex fidelity term to the input image I 0 :

63 63 We search for the smoothest energy minimizer with minimal oscillations between the low energy states (similar to the viscosity solutions reasoning). For that we add a second order term to the energy functional. We use a convex rotationally invariant term: The steepest descent flow is of hyper-diffusion. Higher order regularization

64 64 Initial and boundary conditions: Hyper-diffusion n is a unit vector normal to the boundary

65 65 In the Cahn-Hilliard and Kuramoto-Sivashinsky equations a hyper diffusion term is used to stabilize linear inverse diffusion. Kuramoto, Dynamics of interacting particles, Springer 1984, Sivashinsky Ann. Rev. Mech. 15, 1983, J.W Cahn, J.E. Hilliard, J. Chem. Phys. 28,2, 1958. Physical processes modeled by forward-and- backward diffusion and hyper-diffusion are shown to have a unique solution (no proof in our case yet). see Witelski, Studies in Applied Mathematics, 96, pp. 277-300, 1996. Hyper-diffusion as a stabilizer of inverse diffusion (from the literature)

66 66 Hyper-diffusion vs. diffusion 1D (Step and noise processed after times 0.1,1,10) Hyper-diffusionDiffusion

67 67 Hyper-diffusion 2D (Cameraman processed after times 0.1,1,10)

68 68 Summary : Energy minimization process for selective sharpening Initial and boundary conditions:

69 69 Processing a 1D step with blur and noise

70 70 1D line-edge with blur and noise

71 71 a d b c Processing a 2D step with different blur and noise (a)Isotropic Gaussian (b)Anisotropic exponential (c)5x5 box averaging (d)Jagginess + additive Gaussian and uniform white noise.

72 72 OriginalWell-potentialRegularized shock (ours) (Alvarez Mazorra) Enhancement of a toy car by our scheme and a regularized shock filter (Alvarez-Mazorra).

73 73 Application: super-resolution from a single image Low resolution High resolution

74 74 Triple well modification (anisotropic with texture preserving) OriginalProcessed

75 75 Original Processed

76 76 Conclusion PDE-based techniques were shown to be effective in a variety of image-processing applications with concise and well defined formulations. A well-shaped potential was presented for image sharpening. The process rewards the increase of gradients in some range, while being able to operate in a noisy environment and avoid oscillations and the explosion of the signal. Hyper-diffusion was introduced as a means to stabilize inverse-diffusion type processes.

Download ppt "1 Computer Vision Seminar, HUJI, December 2002 PDE-based Image Processing and the Triple Well Potential for Image Sharpening Faculty of Electrical Engineering,"

Similar presentations

Ads by Google