Total Variation Image Edge Detection

Similar documents
Total Variation Theory and Its Applications

Nonlinear Diffusion. Journal Club Presentation. Xiaowei Zhou

ENERGY METHODS IN IMAGE PROCESSING WITH EDGE ENHANCEMENT

Partial Differential Equations and Image Processing. Eshed Ohn-Bar

Lecture 7: Edge Detection

Machine vision. Summary # 4. The mask for Laplacian is given

Edge Detection. Introduction to Computer Vision. Useful Mathematics Funcs. The bad news

Machine vision, spring 2018 Summary 4

Edge Detection. CS 650: Computer Vision

Lecture 6: Edge Detection. CAP 5415: Computer Vision Fall 2008

Filtering and Edge Detection

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

Novel integro-differential equations in image processing and its applications

Variational Methods in Signal and Image Processing

NON-LINEAR DIFFUSION FILTERING

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

A Partial Differential Equation Approach to Image Zoom

NONLINEAR DIFFUSION PDES

Feature Extraction and Image Processing

A Localized Linearized ROF Model for Surface Denoising

New Identities for Weak KAM Theory

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

Motion Estimation (I) Ce Liu Microsoft Research New England

Introduction to Computer Vision. 2D Linear Systems

Edge Detection in Computer Vision Systems

Image Gradients and Gradient Filtering Computer Vision

Additional Pointers. Introduction to Computer Vision. Convolution. Area operations: Linear filtering

Roadmap. Introduction to image analysis (computer vision) Theory of edge detection. Applications

Linear Operators and Fourier Transform

ECE Digital Image Processing and Introduction to Computer Vision. Outline

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

Laplacian Filters. Sobel Filters. Laplacian Filters. Laplacian Filters. Laplacian Filters. Laplacian Filters

LECTURE # 0 BASIC NOTATIONS AND CONCEPTS IN THE THEORY OF PARTIAL DIFFERENTIAL EQUATIONS (PDES)

Edge Detection PSY 5018H: Math Models Hum Behavior, Prof. Paul Schrater, Spring 2005

Differential Operators for Edge Detection

Convex Hodge Decomposition of Image Flows

Fourier series: Any periodic signals can be viewed as weighted sum. different frequencies. view frequency as an

Introduction to Computer Vision

Multiscale Image Transforms

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

Blobs & Scale Invariance

Modulation-Feature based Textured Image Segmentation Using Curve Evolution

Spatial Enhancement Region operations: k'(x,y) = F( k(x-m, y-n), k(x,y), k(x+m,y+n) ]

Variational Methods in Image Denoising

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

ELLIPTIC PARTIAL DIFFERENTIAL EQUATIONS EXERCISES I (HARMONIC FUNCTIONS)

An Application of the Data Adaptive Linear Decomposition Transform in Transient Detection

PDEs in Image Processing, Tutorials

EDGES AND CONTOURS(1)

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

Digital Image Processing. Lecture 6 (Enhancement) Bu-Ali Sina University Computer Engineering Dep. Fall 2009

A Riemannian Framework for Denoising Diffusion Tensor Images

Advanced Digital Signal Processing -Introduction

Medical Image Analysis

Linear Diffusion and Image Processing. Outline

Fundamental Solutions and Green s functions. Simulation Methods in Acoustics

Appendix A Wirtinger Calculus

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

Nonlinear Flows for Displacement Correction and Applications in Tomography

Image as a signal. Luc Brun. January 25, 2018

Wavelets and Image Compression. Bradley J. Lucier

Digital Image Processing Chapter 11 Representation and Description

Scientific Data Computing: Lecture 3

I Chen Lin, Assistant Professor Dept. of CS, National Chiao Tung University. Computer Vision: 4. Filtering

Solving linear systems (6 lectures)

Introduction to Nonlinear Image Processing

with deterministic and noise terms for a general non-homogeneous Cahn-Hilliard equation Modeling and Asymptotics

Edge Detection. Computer Vision P. Schrater Spring 2003

IMAGE RESTORATION: TOTAL VARIATION, WAVELET FRAMES, AND BEYOND

Linear & nonlinear classifiers

Random walks for deformable image registration Dana Cobzas

A Dual Formulation of the TV-Stokes Algorithm for Image Denoising

Computer Vision. Filtering in the Frequency Domain

Screen-space processing Further Graphics

Computer Vision & Digital Image Processing. Periodicity of the Fourier transform

Consistent Positive Directional Splitting of Anisotropic Diffusion

Module 2: Reflecting on One s Problems

Lecture 8: Interest Point Detection. Saad J Bedros

Mathematical Problems in Image Processing

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

100 CHAPTER 4. SYSTEMS AND ADAPTIVE STEP SIZE METHODS APPENDIX

A Robust Controller for Scalar Autonomous Optimal Control Problems

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

Gradient Descent and Implementation Solving the Euler-Lagrange Equations in Practice

Basics on 2-D 2 D Random Signal

Error Analysis for H 1 Based Wavelet Interpolations

A BAYESIAN APPROACH TO NONLINEAR DIFFUSION BASED ON A LAPLACIAN PRIOR FOR IDEAL IMAGE GRADIENT

G. Larry Bretthorst. Washington University, Department of Chemistry. and. C. Ray Smith

IS NEGATIVE STEP SIZE LMS ALGORITHM STABLE OPERATION POSSIBLE?

Wavelet-based Salient Points with Scale Information for Classification

Efficient Beltrami Filtering of Color Images via Vector Extrapolation

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

Digital Image Processing COSC 6380/4393

Vlad Estivill-Castro (2016) Robots for People --- A project for intelligent integrated systems

Edge Detection. Image Processing - Computer Vision

Introduction to the Calculus of Variations

4. References. words, the pseudo Laplacian is given by max {! 2 x,! 2 y}.

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

In this chapter we study elliptical PDEs. That is, PDEs of the form. 2 u = lots,

Transcription:

Total Variation Image Edge Detection PETER NDAJAH Graduate School of Science and Technology, Niigata University, 8050, Ikarashi 2-no-cho, Nishi-ku, Niigata, 950-28, JAPAN ndajah@telecom0.eng.niigata-u.ac.jp HISAKAZU KIKUCHI Department of Electrical and Electronics Engineering, Niigata University, 8050, Ikarashi 2-no-cho, Nishi-ku, Niigata, 950-28, JAPAN kikuchi@eng.niigata-u.ac.jp Abstract: We studied total variation anisotropic image edge detection. We derive the total variation functional from first principles rather than from measure theory and distribution theory. The Euler-Lagrange equation of the total variation functional gives a steady state equation. The steady state equation acts as an anistropic filter on an image. We compared the total variation method to the Marr-Hildreth method and found that the total variation method gives stronger edges and greater image detail at any scale than the Marr-Hildreth method. The zero crossing method used to find edge points in the Marr-Hildreth method is not effective for the total variation method. simple thresholding appears to be more effective. Key Words: Tv, Anisotropic, Zero crossing, Total variation, Euler lagrange, LoG Introduction Edge detection is a fundamental operation in image processing. Most methods for edge detection can be grouped into two basic categories: Search-based methods which compute the edge strength using first order derivatives. 2 Zero-crossing-based methods which search for zero-crossings in a second order derivative expression computed from the image. This could be the zero crossings of the Laplacian or a nonlinear differential expression. Historically, the Marr-Hildreth edge detection method has been the most popular edge detection method based on second order partial differential equations. It uses the Lapalacian to filter an image. Then the zero-crossings algorithm is then applied on the image to detect the edges. The Laplacian used in the Marr- Hildreth model is a linear partial differential equation and it has isotrpic filtering properties. We approach the problem differently. We begin from the total variation functional for a 2 dimensional image. We minimize the functional by the Euler-Lagrange method. This results is a nonlinear steady state second order partial differential equation. Because the operator is nonlinear, applying it to an image results in an anisotrpic filtering of the image. The filtered image when compared to images filtered using the Marr-Hildreth operator shows stronger image edges. 2 The Total Variation Functional The total variation of a function is the total measure of the change in the function. The total variation of a function is defined as TV = n fx i ) f i ) we can multiply and divide equation by Δx to obtain n TV = fx i ) f i Δx Δx 2) i=0 We can transform equation 2 into the continuous form by writing it as fx h) fx) h = f x) dx 3) Images are two dimensional spatial functions. To find the total variation of a two-dimensional mathematical object, we consider the directional derivative of a scalar function f x) =fx,x 2,..., x n ) along a unit vector u =u,..., u n ). The directional derivative is defined to be the limit u f x) = lim h 0 f x h u) f x) h 4) ISBN: 978-960-474-276-9 246

We assume the function f to be differentiable at x. This means that the directional derivatives exist along any unit vector u, and one has u f x) = f x) u 5) For an image we represent the directional derivatives by i,j so that { xf x) = f x) i = 6) y f x) = f x) j = The components x f x) and y f x) are orthogonal so that f x) =i j 7) and the inner product is ) 2 f x), f x) = f = 8) Therefore, equation3) in two dimensions can be written as f dxdy 9) I which is the total variation of f over the entire image surface I. An important property of the total variation of a function f is that it uses the derivative of f to measure the total change in f. 3 Total Variation of an Image 9) is a norm. and the vectorial components of f are. So, the norm and I f dxdy = In the discrete form, I = fx,y) fx, y) ) 2 dxdy 0) = fx, y ) fx, y) Therefore, the discrete total variation is written 4 The Euler Equation of the Total Variation Functional We restate the total variation functional following the general convention) as Ju) = dxdy 2) where u is our image function and it depends spatially on two independent variables x and y. We state the form of the Euler-Lagrange equation for the case of one dependent variable and several independent variables. Let If) = F x,..., x n,f,f x,..., f xn )dx 3) Ω where f xi = i. 2) is extremized only if f satisfies the partial differentiation equation: F n F =0 4) i xi i= We observe that the total variation functional can be written as Ju, u, x, y) = dxdy 5) The right hand side of the equation tells us that the functional does not depend on u but it depends on its gradient because = ) 2 = f 6) and there is no term in u on the right hand side. So the Euler equation for the total functional variation is: J 2 i= =0 7) i i but J =0since the functional J does not depend on u. Sowehave as: 2 = 8) i= i i 2 2 f = but in an image, x = x and x 2 = y and so 7) x y becomes [fx,y) fx, y)] 2 [fx, y ) fx, y)] 2 x y 2 ) = i i 9) i= ISBN: 978-960-474-276-9 247

This is equivalent to differentiating with respect to x and y. We made f = for simplicity. So differentiating with respect to x, we get = Also, [ = [ [ ] 2 [ then 8) becomes ] 2 ) ] 2 2 = = 20) ) ] 2 2 = = = We can write 9) in vector form as: ) i j ) i ) j = u This can be rewritten as u = 2 ) u 2 2 u 2 = 2 u = Δu 2) 22) 23) 24) From the foregoing analysis, the Euler equation of the total variation functional is or, min Ju) =J min u) = J min u) = 2 u u 25) 26) 5 Partial Differential Equations Image Filters Prior to edge detection, a partial second order partial differential expression usually a Laplacian) is used to filter an image. The result of this filtering is then tested for zero crossings. This is based on the Marr- Hildreth980) model. The use of the Laplacian operator L = 2 2 2 2 27) to operate on an image produces a Laplacian filtered image. This is a basic step in image segmentation using partial differential equations. An example of such segmentation is edge detection. The approach basically consists of defining a discrete formulation of the second order derivative and then constructing a filter mask based on the formulation. The mask is then convolved with the image to produce the filtered image. The Laplacian filter is isotropic. On the other hand the discretized form of the Laplacian can be applied directly to the image. The results are the same. Isotropic filters are rotation invariant in the sense that rotating the image and then applying the filter gives the same result as applying the filter first and then rotating the image. The simplest isotropic derivative operator is the Laplacian [9], which for a functionimage) of two variables, is defined as 2 f = 2 f 2 2 f 2 28) Because derivatives of any order are linear operators, the Laplacian is also a linear operator. To implement the Laplacian on a digital image, we discretize it as follows: { 2 2 = fx,y)fx,y) 2fx, y) 2 2 = fx, y )fx, y ) 2fx, y) 29) So, adding the two equations, 2 fx, y) = fx,y)fx,y)fx, y ) fx, y ) 4fx, y) 30) which filters the image. This equation can also be implemented using the filter mask in Table. The mask gives an isotropic result for rotations. Figure shows the effect of this mask on an image. A variant of the above mask which works better is Table 2. It is also isotropic. ISBN: 978-960-474-276-9 248

0 0-4 0 0 TV filter Table : Mask Original Image Image filtered with Laplacian mask whose central value is 4 Figure : Image Filtered with Mask -8 Table 2: Mask 2 Original Image Image Filtered with Mask Figure 2: Original Shapes Image and its Laplacian Filtered Image 6 The Total Variation Filter We use the Euler-Lagrange equation of the total variation functional as a filter in place of the Laplacian. J min u) = 2 u 3) But we can see that the J min u) is related to the Laplacian. The numerator of J min u) is the Laplacian. The difference is that the denominator is. Now, is a function. It takes different values at different pixels in the image. Both the Laplacian and J min u) represent diffusion. The Laplacian is isotropic but the total variation filter is anisotropic. Below we present images filtered with the total variation filter. The anisotropic property of the TV filter gives it some Figure 3: TV Filtered Image of Shapes advantages over the traditional Laplacian filter. We present these advantages in the next section. 7 Characteristics of The Total Variation Filter We state some reasons that give the total variation filter an advantage over the traditional Laplacian filter:. The total variation filter is better at edge-sensitive filtering than the Laplacian. A comparison of the TV-filtered images Figures 7 and 9) to the other images Figures 2 to 5) shows that the edges in the TV-filtered images are conspicuously more pronounced and detailed. 2. The total variation filter is quite texture-sensitive. This is very obvious in Figure 3. The detailed changes in the texture of the images are clearly captured in the filtered image. 3. A drawback of the Laplacian is that during the filteration process, a double edge is formed. The total variation filter overcomes this disadvantage see Figures 4 to 7). There is only one edge formed and it is appreciably strong. Unlike the Laplacian filter, the TV filter does not show false edges. The images being compared below show this clearly. To illustrate this point, we show an image with sharp edges the noisesquare image). The image was filtered with Mask, Mask 2 and the total variation filter. Mask and Mask 2 are Laplacian filters and so the corresponding images are scaled to show the presence of double edges. This is not so in the case of the total variation filter. There is only one edge. However, the total variation filtered cannot be scaled. ISBN: 978-960-474-276-9 249

Figure 4: Image filtered with Mask 2: It is Scaled to Show Double Edges Figure 6: Magnified Region of Interest Showing Double Edges in Laplacian Filtered Image Figure 5: Image filtered with TV Filter: No double Edges 8 Detecting Edges Edge detection first begins with a smoothing of the image. This is necessary to remove noise and image structures below a certain scale. This is accomplished by convolving the Gaussian function Gx, y) =e x2 y 2 2σ 2 32) with the image function ux, y) i.e. Dx, y) =Gx, y) ux, y) 33) Figure 7: Magnified Region of Interest Showing Single Edge in TV-Filtered Image σ is the standard deviation of Gx, y) and it acts as a scaling factor. It determines the scale of the structures that can be detected. For edge detection using the Laplacian operator, we apply the operator to the smoothed image Dx, y) i.e. 2 Dx, y). The resulting image is called the Laplacian of Gaussian LoG) image. Likewise for the total variation nolinear operator, we apply 2 Dx,y) D. Below we show results of edge detection based on the LoG images and total variation filtered images. Edge detection for both kinds of images, do not follow exactly the same process. The traditional method of detecting edges in LoG images is by zero crossings. Fig- ISBN: 978-960-474-276-9 250

ure 8 shows an example of this. However, this method is not effective for the total variation filtered images. The zero crossings do not give strong edges as expected. Therefore, for application purposes, it is best to avoid the use of zero crossings in total variation filtered images. A simple thresholding gives a better result. Figure 9 was obtained by thresholding the total variation filtered image at 0. Generally, the edges in the total variation filtered image are stronger than edges in the LoG image. The pixels in the LoG image were magnified by a factor of 30 to give the result shown in Figure 8. But even after a magnification of the pixel strength, the edges in the LoG image still do not possess the same strength and detail as the edges in the total variation filtered image. Magnifying the pixel strength of total variation filtered risks destroying the edges. Figure 9: Edge Detection in Total variation Filtered Image with Thresholding at 0 and σ =2 filtered images. Simple thresholding is more effective. Figure 8: Zero Crossing of LoG Image with Pixel Strength Magnification of 30 and σ =2 9 Conclusion We have compared the total variation edge detection method to the Marr-Hildreth method and found that:. The TV method gives stronger edges and detail than the Marr-Hildreth method. 2. The TV filter produces only a single strong edge rather than the double edges in the Laplacian filtered image. 3. The zero crossing method used in detecting edges in the LoG images is not effective in TV References: [] Tony F. Chan and Jianchong Shen, Image Processing and Analysis: Variational, PDE, Wavelet and Stochastic Methods, SIAM. 2005. [2] Rafael Gonzalez and Richard E. Woods, Digital Image Processing, Pearson Prentice Hall, 2008. [3] Al Bovik, Handbook of Image and Video Processing, Academic Press, 2000. [4] D. Marr and E. Hildreth, Theory of Edge Detection, Proc. R. Soc. Lond. B 207, 87-27,, 980. [5] Mark Nixon and Alberto Aguado, Feature Extraction and Image Processing, Second Edition, Academic Press, 2008. [6] J.R. Parker, Algorithms for Image Processing and Computer Vision, Wiley Computer Publishing, 997. [7] Fritz John, Partial Differential Equations, Fourth Edition, Springer, 982. [8] J.D. Logan, An Introduction to Nonlinear Partial Differential Equations, Second Edition, John Wiley and Sons, Inc., 2008. [9] Rosenfeld A. and Kak A.C. Digital Picture Processing, Academic Press, 976. [0] Ehsan Nadernajad, Sara Sharifzadeh and Hamid Hassanpour, Edge Detection Techniques: Evaluation and Comparisons Applied Mathematical Sciences,Vol. 2, 2008, no. 3, 507-520. ISBN: 978-960-474-276-9 25