Partial Differential Equations and Image Processing. Eshed Ohn-Bar

Similar documents
Total Variation Theory and Its Applications

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

ENERGY METHODS IN IMAGE PROCESSING WITH EDGE ENHANCEMENT

Nonlinear Diffusion. Journal Club Presentation. Xiaowei Zhou

Total Variation Image Edge Detection

NONLINEAR DIFFUSION PDES

RIGOROUS MATHEMATICAL INVESTIGATION OF A NONLINEAR ANISOTROPIC DIFFUSION-BASED IMAGE RESTORATION MODEL

Introduction to Nonlinear Image Processing

Introduction to numerical schemes

A Localized Linearized ROF Model for Surface Denoising

NON-LINEAR DIFFUSION FILTERING

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

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

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

Question 9: PDEs Given the function f(x, y), consider the problem: = f(x, y) 2 y2 for 0 < x < 1 and 0 < x < 1. x 2 u. u(x, 0) = u(x, 1) = 0 for 0 x 1

An Introduction to Partial Differential Equations

Chapter 1: Introduction

COMP344 Digital Image Processing Fall 2007 Final Examination

Lecture 9 Approximations of Laplace s Equation, Finite Element Method. Mathématiques appliquées (MATH0504-1) B. Dewals, C.

Local Enhancement. Local enhancement

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

Novel integro-differential equations in image processing and its applications

Scientific Computing: An Introductory Survey

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

Efficient Beltrami Filtering of Color Images via Vector Extrapolation

Variational Methods in Image Denoising

MATH 333: Partial Differential Equations

Reading. 3. Image processing. Pixel movement. Image processing Y R I G Q

Lecture 42 Determining Internal Node Values

A Riemannian Framework for Denoising Diffusion Tensor Images

AM 205: lecture 14. Last time: Boundary value problems Today: Numerical solution of PDEs

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

Numerical Methods of Applied Mathematics -- II Spring 2009

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

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

A Tensor Variational Formulation of Gradient Energy Total Variation

Solving linear systems (6 lectures)

PDE-based image restoration, I: Anti-staircasing and anti-diffusion

Strong Stability-Preserving (SSP) High-Order Time Discretization Methods

Dr. D. Dinev, Department of Structural Mechanics, UACEG

Applied Mathematics 505b January 22, Today Denitions, survey of applications. Denition A PDE is an equation of the form F x 1 ;x 2 ::::;x n ;~u

Image Noise: Detection, Measurement and Removal Techniques. Zhifei Zhang

Templates, Image Pyramids, and Filter Banks

PDEs in Image Processing, Tutorials

Introduction LECTURE 1

INTRODUCTION TO PDEs

A Variational Approach to Reconstructing Images Corrupted by Poisson Noise

Local enhancement. Local Enhancement. Local histogram equalized. Histogram equalized. Local Contrast Enhancement. Fig 3.23: Another example

Image Gradients and Gradient Filtering Computer Vision

Elements of Matlab and Simulink Lecture 7

Math (P)Review Part II:

Math 127: Course Summary

CHAPTER 7. An Introduction to Numerical Methods for. Linear and Nonlinear ODE s

ENGI Partial Differentiation Page y f x

Numerical Methods for ODEs. Lectures for PSU Summer Programs Xiantao Li

Edge detection and noise removal by use of a partial differential equation with automatic selection of parameters

Math 46, Applied Math (Spring 2008): Final

APPLICATIONS OF FD APPROXIMATIONS FOR SOLVING ORDINARY DIFFERENTIAL EQUATIONS

Nonlinear regularizations of TV based PDEs for image processing

Motion Estimation (I)

Linear Diffusion and Image Processing. Outline

Final Exam May 4, 2016

A Nonlocal p-laplacian Equation With Variable Exponent For Image Restoration

IMAGE RESTORATION: TOTAL VARIATION, WAVELET FRAMES, AND BEYOND

ENGI Partial Differentiation Page y f x

The integrating factor method (Sect. 1.1)

MATH 425, FINAL EXAM SOLUTIONS

UNIVERSITY OF MANITOBA

Tutorial 2. Introduction to numerical schemes

TWO-PHASE APPROACH FOR DEBLURRING IMAGES CORRUPTED BY IMPULSE PLUS GAUSSIAN NOISE. Jian-Feng Cai. Raymond H. Chan. Mila Nikolova

Preliminary Examination in Numerical Analysis

Image Deblurring in the Presence of Impulsive Noise

Computational Photography

BERNSTEIN FILTER: A NEW SOLVER FOR MEAN CURVATURE REGULARIZED MODELS. Yuanhao Gong. National University of Singapore

Gauge optimization and duality

ENO and WENO schemes. Further topics and time Integration

Fourier Spectral Computing for PDEs on the Sphere

Applied Mathematics 205. Unit III: Numerical Calculus. Lecturer: Dr. David Knezevic

Image processing and Computer Vision

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK

Neighborhood filters and PDE s

MATH3203 Lecture 1 Mathematical Modelling and ODEs

Adaptive Primal Dual Optimization for Image Processing and Learning

C2 Differential Equations : Computational Modeling and Simulation Instructor: Linwei Wang

Final: Solutions Math 118A, Fall 2013

UNIVERSITY OF MANITOBA

BSM510 Numerical Analysis

Lecture 17: Ordinary Differential Equation II. First Order (continued)

Lecture 3: Linear Filters

The Heat Equation John K. Hunter February 15, The heat equation on a circle

Math 251 December 14, 2005 Final Exam. 1 18pt 2 16pt 3 12pt 4 14pt 5 12pt 6 14pt 7 14pt 8 16pt 9 20pt 10 14pt Total 150pt

10.34 Numerical Methods Applied to Chemical Engineering. Quiz 2

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

examples of equations: what and why intrinsic view, physical origin, probability, geometry

Solving First Order PDEs

VARIATIONAL METHODS FOR IMAGE DEBLURRING AND DISCRETIZED PICARD'S METHOD

Preliminary Examination, Numerical Analysis, August 2016

Lecture 3: Linear Filters

Medical Image Analysis

Partial Differential Equations - part of EM Waves module (PHY2065)

Transcription:

Partial Differential Equations and Image Processing Eshed Ohn-Bar

OBJECTIVES In this presentation you will 1) Learn what partial differential equations are and where do they arise 2) Learn how to discretize and numerically approximate solutions of a particular PDE, the heat equation, using MATLAB 3) Learn how energy minimization of the total variation norm can be used to de-noise an image OBJECTIVES

Warm Up Solving an Ordinary Differential Equation I.V.P: SEPERABLE! INTEGRATE USE INITIAL CONDITIONS x depends on t only. What if we have more than one variable involved? 1 st objective: Learn what partial differential equations are and where do they arise

Definitions ODE: One independent variable PDE: Several independent variables, relationship of functions and their partial derivatives. Notation: Gradient (2D): Laplacian (2D): 1 st objective: Learn what partial differential equations are and where do they arise

Discrete derivative Finite difference: First derivative using a forward difference fx = f(x+1,y) f(x,y) In MATLAB: n = length(f); f_x = [f(2:n) f(n)] -f(1:n) Second Derivative using a 2 nd order central difference: In MATLAB: f_xx = f(:,[2:n,n])-2*f +f(:,[1,1:n-1]); 1 st objective: Learn what partial differential equations are and where do they arise

The Heat Equation and Diffusion In 1D: In 2D: temperature function, at point x and time t Need initial conditions! initial temperature at each point Also boundary conditions, when x=0 and x=l To the next objective of discretizing the Heat Equation and the beautiful connection between PDEs and image processing 1 st objective: Learn what partial differential equations are and where do they arise

Code Discrete Heat Equation U t = ΔU dt = 0.1; T = 10; [m,n]=size(u); for t = 0:dt:T u_xx = u(:,[2:n,n])-2*u +u(:,[1,1:n-1]); u_yy = u([2:m,m],:) - 2*u + u([1,1:m-1],:); L = uxx + uyy; u = u + dt*l; end U t U xx U yy 2 nd objective: Learn how to discretize the heat equation

Heat Equation on an Image What would happen if we evolve the heat equation on an image? dt = 0.2 (a) Original Image (b) Time = 5 (c) Time = 10 (d) Time = 30 2 nd objective: Learn how to discretize the heat equation

Heat Equation on an Image Applying the heat equation causes blurring. Why? Graphical interpretation of the heat equation U concave down U t < 0 U decreasing U concave up U t > 0 U increasing 2 nd objective: Learn how to discretize the heat equation

Heat Equation on an Image What s going to happen as t->? Diffusion of heat smoothes the temperature function Equivalent to minimizing the L-2 norm of the gradient: Problem: Isotropic diffusion, uniform, doesn t consider shapes and edges. 2 nd objective: Learn how to discretize the heat equation

Anisotropic Diffusion Slows down diffusion at the edges 3 rd objective: Learn how energy minimization of total variation can de-noise an image

Anisotropic Diffusion (a) Original Image (b) Time = 5 (c) Time = 10 (d) Time = 30 3 rd objective: Learn how energy minimization of total variation can de-noise an image

Anisotropic Diffusion (a) Original Image (b) Time = 5 (c) Time = 10 (d) Time = 30 3 rd objective: Learn how energy minimization of total variation can de-noise an image

Anisotropic Diffusion Total Variation (TV)[1] Goal: remove noise without blurring object boundaries. We add a regularization term to change the steady state solution. Minimize the total variation energy: Using the Euler Lagrange equation [1] Rudin, L. I.; Osher, S. J.; Fatemi, E. Nonlinear total variation based noise removal algorithms. Phys. D 60 (1992), 259 268 3 rd objective: Learn how energy minimization of total variation can de-noise an image

TV - Code T = 100; dt = 0.2; epsilon = 0.01; for t = 0:dt:T u_x = (u(:,[2:n,n]) - u(:,[1,1:n-1]))/2; u_y = (u([2:m,m],:) - u([1,1:m-1],:))/2; u_xx = u(:,[2:n,n]) - 2*u + u(:,[1,1:n-1]); u_yy = u([2:m,m],:) - 2*u + u([1,1:m-1],:); u_xy = ( u([2:m,m],[2:n,n]) + u([1,1:m-1],[1,1:n-1]) - u([1,1:m-1],[2:n,n]) - u([2:m,m],[1,1:n-1]) ) / 4; Numer = u_xx.*u_y.^2-2*u_x.*u_y.*u_xy + u_yy.*u_x.^2; Deno = (u_x.^2 + u_y.^2).^(3/2) + epsilon; u = u + dt*( Numer./Deno)- 2*lambda*(u-u0(:,:,1)); U t 3 rd objective: Learn how energy minimization of total variation can de-noise an image

TV Denoising Lambda = 0.01 Original Image Gaussian Noise Time = 70 Time = 200 3 rd objective: Learn how energy minimization of total variation can de-noise an image

TV Denoising lambda = 0.1 Original Time = 5 Time = 10 3 rd objective: Learn how energy minimization of total variation can de-noise an image

How to choose Lambda? There are various optimization and ad-hoc methods, beyond the scope of this project. In this project, the value is determined by pleasing results. Lambda too large -> may not remove all the noise in the image. Lambda too small -> it may distort important features from the image. 3 rd objective: Learn how energy minimization of total variation can de-noise an image

MSE How to choose Lambda? Original 190 MSE for Varying Lambda on lena with salt&pepper noise 180 170 Salt & Pepper Noise 160 150 140 130 120 110 De-noised 100 0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01 lambda

Summary Energy minimization problems can be translated to a PDE and applied to de-noise images We can use the magnitude of the gradient to produce anisotropic diffusion that preserves edges TV energy minimization uses the L1-norm of the gradient, which produces nicer results on images than the L2-norm