Nonlinear Diffusion. 1 Introduction: Motivation for non-standard diffusion

Similar documents
NONLINEAR DIFFUSION PDES

Nonlinear Diffusion. Journal Club Presentation. Xiaowei Zhou

ITK Filters. Thresholding Edge Detection Gradients Second Order Derivatives Neighborhood Filters Smoothing Filters Distance Map Image Transforms

Image enhancement. Why image enhancement? Why image enhancement? Why image enhancement? Example of artifacts caused by image encoding

Linear Diffusion. E9 242 STIP- R. Venkatesh Babu IISc

NON-LINEAR DIFFUSION FILTERING

Fraunhofer Institute for Computer Graphics Research Interactive Graphics Systems Group, TU Darmstadt Fraunhoferstrasse 5, Darmstadt, Germany

Tensor-based Image Diffusions Derived from Generalizations of the Total Variation and Beltrami Functionals

T H E S I S. Computer Engineering May Smoothing of Matrix-Valued Data. Thomas Brox

Consistent Positive Directional Splitting of Anisotropic Diffusion

FFTs in Graphics and Vision. The Laplace Operator

Medical Image Analysis

Medical Image Analysis

A Riemannian Framework for Denoising Diffusion Tensor Images

Forward-and-Backward Diffusion Processes for Adaptive Image Enhancement and Denoising

Spectral Processing. Misha Kazhdan

We have seen that for a function the partial derivatives whenever they exist, play an important role. This motivates the following definition.

Linear Diffusion and Image Processing. Outline

Scale Space Analysis by Stabilized Inverse Diffusion Equations

MIT (Spring 2014)

Erkut Erdem. Hacettepe University February 24 th, Linear Diffusion 1. 2 Appendix - The Calculus of Variations 5.

Introduction and some preliminaries

Chapter 6 Nonlinear Systems and Phenomena. Friday, November 2, 12

CN780 Final Lecture. Low-Level Vision, Scale-Space, and Polyakov Action. Neil I. Weisenfeld

CS 542G: Robustifying Newton, Constraints, Nonlinear Least Squares

14 September 2013 On the paper by Loss et al. about stabilizing the toric code by coupling to a scalar field. (arxiv: )

LAGRANGE MULTIPLIERS

The Implicit Function Theorem

Lecture 7: Edge Detection

1 Fundamentals. 1.1 Overview. 1.2 Units: Physics 704 Spring 2018

Tensor fields. Tensor fields: Outline. Chantal Oberson Ausoni

Math (P)Review Part II:

PDE Based Image Diffusion and AOS

February 27, 2019 LECTURE 10: VECTOR FIELDS.

Introduction to Aspects of Multiscale Modeling as Applied to Porous Media

graphics + usability + visualization Edge Aware Anisotropic Diffusion for 3D Scalar Data on Regular Lattices Zahid Hossain MSc.

Upon successful completion of MATH 220, the student will be able to:

Math 5BI: Problem Set 6 Gradient dynamical systems

Partial Differential Equations Summary

Edge Detection in Computer Vision Systems

Filtering and Edge Detection

CE-570 Advanced Structural Mechanics - Arun Prakash

IFT CONTINUOUS LAPLACIAN Mikhail Bessmeltsev

Introduction to Nonlinear Image Processing

100 CHAPTER 4. SYSTEMS AND ADAPTIVE STEP SIZE METHODS APPENDIX

CS5540: Computational Techniques for Analyzing Clinical Data. Prof. Ramin Zabih (CS) Prof. Ashish Raj (Radiology)

Geometric Modeling Summer Semester 2010 Mathematical Tools (1)

Linear Models in Machine Learning

Focus was on solving matrix inversion problems Now we look at other properties of matrices Useful when A represents a transformations.

Partial Differential Equations and Image Processing. Eshed Ohn-Bar

(Refer Slide Time: 03: 09)

8 Eigenvectors and the Anisotropic Multivariate Gaussian Distribution

Class Meeting # 2: The Diffusion (aka Heat) Equation

Linear Algebra Review (Course Notes for Math 308H - Spring 2016)

Estimators for Orientation and Anisotropy in Digitized Images

Lecture 6 Surface Diffusion Driven by Surface Energy

Physics 6303 Lecture 2 August 22, 2018

EE 367 / CS 448I Computational Imaging and Display Notes: Image Deconvolution (lecture 6)

The derivative: Definition

Math 302 Outcome Statements Winter 2013

This paper is about a new method for analyzing the distribution property of nonuniform stochastic samples.

Statistical Geometry Processing Winter Semester 2011/2012

Chaos and Liapunov exponents

Math 426H (Differential Geometry) Final Exam April 24, 2006.

USES OF EIGENVALUES AND EIGENVECTORS. Math 223

Where is the bark, the tree and the forest, mathematical foundations of multi-scale analysis

3.7 Constrained Optimization and Lagrange Multipliers

Lecture Introduction

Lecture 11: Differential Geometry

Laplacian Mesh Processing

Class Meeting # 1: Introduction to PDEs

Lecture 1, August 21, 2017

Directional Field. Xiao-Ming Fu

Applied Linear Algebra in Geoscience Using MATLAB

Dispersion relations, linearization and linearized dynamics in PDE models

Approximation, Taylor Polynomials, and Derivatives

Markov Chain Monte Carlo The Metropolis-Hastings Algorithm

[Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty.]

Fundamentals of Transport Processes Prof. Kumaran Indian Institute of Science, Bangalore Chemical Engineering

Introduction to Partial Differential Equations

Function Approximation

30.4. Matrix Norms. Introduction. Prerequisites. Learning Outcomes

First of all, the way a nonlinear autonomous system looks, you have had some practice with it by now. This is nonlinear.

Game Physics. Game and Media Technology Master Program - Utrecht University. Dr. Nicolas Pronost

Linear Algebra Massoud Malek

SVAN 2016 Mini Course: Stochastic Convex Optimization Methods in Machine Learning

Singular Value Decomposition

Lecture 5 : Projections

Introduction LECTURE 1

Math (P)Review Part I:

4 Divergence theorem and its consequences

Elements of Continuum Elasticity. David M. Parks Mechanics and Materials II February 25, 2004

CS 468, Lecture 11: Covariant Differentiation

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel

Introduction to gradient descent

NIH Public Access Author Manuscript Med Image Anal. Author manuscript; available in PMC 2014 July 16.

Math 234 Exam 3 Review Sheet

CSCI 239 Discrete Structures of Computer Science Lab 6 Vectors and Matrices

WARPED PRODUCT METRICS ON R 2. = f(x) 1. The Levi-Civita Connection We did this calculation in class. To quickly recap, by metric compatibility,

Summary of various integrals

Transcription:

Nonlinear Diffusion These notes summarize the way I present this material, for my benefit. But everything in here is said in more detail, and better, in Weickert s paper. 1 Introduction: Motivation for non-standard diffusion First, let s begin with some definitions and examples of why we want to use other kinds of diffusion beyond Gaussian smoothing. We have considered the case of a noisy step edge, and noticed that Gaussian smoothing smooths across the edge. Gaussian smoothing makes sense away from the edge, but we might want to do something different around the edge. If smoothing is not the same everywhere, we can call this non-homogenous. We want to do this so smoothing is influenced by local image properties. We might want smoothing to depend on the smoothed image, not the original image. That is, if smoothing eliminates some unimportant structure, that structure should not continue to affect the smoothing. When the smoothing depends on the current, diffused image, though, we get a nonlinear equation for the smoothing, which we call non-linear diffusion. Finally, we may also want the direction of the flux to depend on image properties. If the intensities are linear (form a ramp) we want the flux to be in the direction in which the ramp is going down, which is the direction of the gradient. This is essentially a 1D problem, with the same direction we had in 1D. If the flux is always in the direction of the gradient, we call the diffusion isotropic. However, near a step edge, we might want the flux to be parallel to the edge, which is perpendicular to the gradient. If the direction of the flux varies in the image, we call it anisotropic. 2 Diffusion in 2D We discussed homogenous, isotropic diffusion in 1D because it is essentially the same in 1D and 2D. Anisotropic diffusion only makes sense in 2D, though, so we need to move to a 2D discussion of diffusion. We will use notation consistent with Weickert s article, so: f(x) is the density at time 0 (ie the image). u(x, t) is the density at position x and time t. In 1D homogenous, isotropic diffusion, the equation for flux is: j(x, t) = D x. In 2D, the equation for flux becomes: j = D u Here, the flux, j, will be a vector, indicating that the flux has a magnitude and direction. If D is a scalar, then the flux is in the direction of the gradient of u, and we have isotropic diffusion. If D is a constant scalar, then the flow is also homogenous, and equivalent to Gaussian smoothing. Note that this is exactly analogous to the 1D case. However, D can also be a tensor (2x2 matrix) which maps the gradient to a different direction and magnitude. When D is a spatially varying tensor that 1

depends on u, then the direction of the flux can depend on local image properties (as well as its magnitude, of course). In 1D we have the equation: t = j x This is essentially expressing the conservation of mass. excess mass. In 2D, we have the equation: It says that varying flux deposits where div is the divergence. That is, t = divj. divj = j x + j y This says that the change in concentration is proportional to the divergence of the gradient field. Divergence is just measuring the way the gradient is piling up at a point. For example, if the gradient is constant, the divergence is 0. Finally, in 1D we had the diffusion equation: In 2D the diffusion equation becomes: t = D 2 u x 2 t = div(d u) 3 Non-linear diffusion - Perona-Malik diffusion If we stick with isotropic diffusion, we cannot regulate the direction of the diffusion (so we actually could consider this in 1D) we only regulate the amount. It makes sense to have less diffusion where the image is changing fast, that is, near edge-like things. We can do this with: t = div(g(x) u) Here we write D as g(x) to indicate that it is a scalar function of image position. That is, g(x) is a spatially varying diffusion. If g(x) only depends on the initial image, then it is effectively constant and so we get a linear PDE. A natural choice would be a function that decreases with f. One example in use is: g( f 2 1 1 + f 2 for some constant λ > 0. Notice this decreases from 1 to 0 as f grows. When f = λ, g = 1 2. 2

As mentioned above, this produces artifacts, because even after a small structure disappears, it continues to influence the image. It also seems unpleasing, because if two points have the same f they will always experience the same amount of smoothing, even if after some smoothing one has a derivative of 0, and the other still has a high derivative. This might happen with a ramp edge with noise wiggles added. So instead, we make g depend on the current, partially smoothed image, not the initial image. This whole approach was introduced by Perona-Malik, who suggested: g( u 2 1 1 + u 2 This means that as we smooth, we modulate the amount of smoothing at each location by the current magnitude of the gradient. 4 Instability and artifacts This works well in practice. Unfortunately, when we analyze Perona-Malik, we find that it is an ill-posed PDE. That means the solutions may not be unique, and they can be unstable (that is, change a lot with small changes in the initial conditions). The way to fix this is with regularization, which means, some kind of smoothing. This is why it works pretty well in practice; discretization acts as a kind of regularization, because it is like approximating the function with a piecewise constant function, which is smoother. This can produce weird results, though, such as worse artifacts when we discretize more. A more principled way to fix this is with g( u σ 2 1 1 + u σ 2 where u σ denotes the density smoothed with a Gaussian. That is, we could write: u σ = K σ u. 5 Anisotropic Diffusion As mentioned before, we may want to diffuse in different directions in different parts of the image. When there is an edge, we could diffuse orthogonal to it. So we want to construct the diffusion tensor, D, so it smooths more in the direction where the image is coherent (ie, there is not so much variation in intensity) and less in direction where it is not coherent. We can do this in the following way: First, we denote the eigenvectors of D to be v 1 and v 2. We construct D so that v 1 is parallel to u σ (and of course, v 2 is perpendicular to it). We denote the corresponding eigenvalues of D to be λ 1 = g( u σ 2 ) and, with = 1. We apply this D in the standard diffusion equation: t = div(d u) Let s unpack this equation a little bit. First of all, notice that if the direction of u σ is the same as the direction of u, then this diffusion is the same as Perona-Malik diffusion. In general, u 3

has components in v 1 and v 2 which get scaled by λ 1 and. If u only has a component in the direction of v 1, this gets scaled by λ 1, but the direction of D u is the same as the direction of u. The key thing about this method is that sometimes the flux is not in the direction of u. As an example, suppose u σ has a very large magnitude, and a direction different from u. Then λ 1 will be near 0 and the component of u that is in the direction of u σ will be wiped out by D, but the orthogonal component of u will be preserved, and there will be flux in that direction. So this method relies on the image gradient having different directions at different scales. The idea is that at a larger scale, u σ is determined by the structure in the scene. At small scale, u reflects noise that needs to be smoothed, which can be quite different. To summarize some cases: If the intensity variation is the same in all directions, the diffusion tensor will have two arbitrary eigenvectors with equal eigenvalues. This means D reduces to a scalar, and diffusion is isotropic. If the direction of the gradient is also the direction of greatest variation, then this is one D s eigenvectors. That means that the smoothing will still occur in the direction of the gradient. The gradient is computed on a smaller scale than the intensity variation. If the two are unrelated, so the gradient direction is at a 45 degree angle to the direction of greatest variation, then: If the variation in intensity is almost the same in both directions, smoothing occurs in direction of gradient; as coherence increases, smoothing increases in coherence direction. Why is it done this way? The direction of flux is never perpendicular to the direction of gradient. In fact it always must have a component in the opposite of the direction of gradient, and no component in the direction of gradient. These properties follow from the fact that the diffusion tensor is positive definite, which is needed to ensure good properties of the diffusion, such as having a unique solution. We can see the importance of making D positive definite with a simple example. Suppose D had an eigenvector in the direction of the gradient, but this had a negative eigenvalue. This would allow us to construct a diffusion that is the inverse of ordinary diffusion, and that undoes it effects. So, with ordinary diffusion, we can take very different images and smooth them until they are almost constant, and all look nearly the same. If we applied the inverse process, we could start with nearly identical, smooth images, and produce images that look radically different. This means that inverting diffusion is a very unstable process, and can t be computed effectively. 6 The Beltrami View Sochen et al. give another way to formulate anisotropic diffusion, which seems very intuitive. Recall that we can think of ordinary diffusion as the process of replacing each intensity with a weighted average of neighboring intensities, where each neighboring intensity is weighted by the Gaussian of its distance to the pixel. In the Beltrami framework, we do exactly the same thing, except we think of an image as a 2D surface in 3D. Each point, (x, y), with intensity u(x, y) is mapped to the 3D point (x, y, Cu(x, y)). C is a constant, that indicates how to weight intensity vs. spatial coordinates. Then, we take a weighted average, using the geodesic distance in this space, rather than the Euclidean distance in (x, y) space. 4

Suppose, for example, we have two nearby points on opposite sides of a step edge. The geodesic distance between them will be very big, because it depends on the change in intensity as well as the change in (x,y) coordinates. This means that a point near an edge is updated by the average of points that are mostly on the same side of the edge. This produces anisotropy in a very natural way. In the direction where there is little variation in intensity, more pixels are nearby in terms of geodesic distance, so more pixels are used in the average. Notice that the parameter C controls the degree of anisotropy. If C is small, this reduces to Gaussian smoothing. As C grows, the effect of intensity variations is magnified. In the extreme case, as C goes to infinity, only intensity variations matter. Consider the 1D case. Any point on a curve that is not an extrema has a neighborhood of larger intensity values on one side, and an identical but negative neighborhood on the other side. So the only points affected by this smoothing are the extrema, which move to become less extreme. This evolves piecewise constant regions, where the amount of variation between extrema is constantly reduced. This is related to total variation diffusion, because it reduces the total variation of the curve. 7 Non-linear Diffusion and Segmentation Note that non-linear diffusion tends to produce a kind of segmentation. We get regions that are piecewise constant, or nearly so, in the course of the diffusion. 5