Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Discrete Laplace operator
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Definitions== ===Graph Laplacians=== There are various definitions of the ''discrete Laplacian'' for [[Graph (discrete mathematics)|graphs]], differing by sign and scale factor (sometimes one averages over the neighboring vertices, other times one just sums; this makes no difference for a [[regular graph]]). The traditional definition of the graph Laplacian, given below, corresponds to the '''negative''' continuous Laplacian on a domain with a free boundary. Let <math>G = (V,E)</math> be a graph with vertices <math>V</math> and edges <math>E</math>. Let <math>\phi\colon V\to R</math> be a [[function (mathematics)|function]] of the vertices taking values in a [[ring (mathematics)|ring]]. Then, the discrete Laplacian <math>\Delta</math> acting on <math>\phi</math> is defined by :<math>(\Delta \phi)(v)=\sum_{w:\,d(w,v)=1}\left[\phi(v)-\phi(w)\right]</math> where <math>d(w,v)</math> is the [[Distance (graph theory)|graph distance]] between vertices w and v. Thus, this sum is over the nearest neighbors of the vertex ''v''. For a graph with a finite number of edges and vertices, this definition is identical to that of the [[Laplacian matrix]]. That is, <math> \phi</math> can be written as a column vector; and so <math>\Delta\phi</math> is the product of the column vector and the Laplacian matrix, while <math>(\Delta \phi)(v)</math> is just the ''v'''th entry of the product vector. If the graph has weighted edges, that is, a weighting function <math>\gamma\colon E\to R</math> is given, then the definition can be generalized to :<math>(\Delta_\gamma\phi)(v)=\sum_{w:\,d(w,v)=1}\gamma_{wv}\left[\phi(v)-\phi(w)\right]</math> where <math>\gamma_{wv}</math> is the weight value on the edge <math>wv\in E</math>. Closely related to the discrete Laplacian is the '''averaging operator''': :<math>(M\phi)(v)=\frac{1}{\deg v}\sum_{w:\,d(w,v)=1}\phi(w).</math> ===Mesh Laplacians=== In addition to considering the connectivity of nodes and edges in a graph, mesh Laplace operators take into account the geometry of a surface (e.g. the angles at the nodes). For a two-dimensional [[manifold]] triangle mesh, the [[Laplace–Beltrami operator]] of a scalar function <math>u</math> at a vertex <math>i</math> can be approximated as :<math> (\Delta u)_{i} \equiv \frac{1}{2A_i} \sum_{j} (\cot \alpha_{ij} + \cot \beta_{ij}) (u_j - u_i), </math> where the sum is over all adjacent vertices <math>j</math> of <math>i</math>, <math>\alpha_{ij}</math> and <math>\beta_{ij}</math> are the two angles opposite of the edge <math>ij</math>, and <math>A_i</math> is the ''vertex area'' of <math>i</math>; that is, e.g. one third of the summed areas of triangles incident to <math>i</math>. It is important to note that the sign of the discrete [[Laplace–Beltrami operator]] is conventionally opposite the sign of the ordinary [[Laplace operator]]. The above cotangent formula can be derived using many different methods among which are [[finite element method|piecewise linear finite elements]], [[finite volume method|finite volumes]], and [[discrete exterior calculus]].<ref name="crane13"> {{cite conference | last1= Crane |first1=K. |last2=de Goes |first2=F. |last3=Desbrun |first3=M. |last4=Schröder |first4=P. | year = 2013 | title = Digital geometry processing with discrete exterior calculus | conference = SIGGRAPH '13 | book-title = ACM SIGGRAPH 2013 Courses | volume = 7 | pages = 1–126 | url = http://doi.acm.org/10.1145/2504435.2504442 | doi = 10.1145/2504435.2504442 }} </ref> To facilitate computation, the Laplacian is encoded in a matrix <math>L\in\mathbb{R}^{|V|\times|V|}</math> such that <math> Lu = (\Delta u)_i </math>. Let <math>C</math> be the (sparse) ''cotangent matrix'' with entries <math> C_{ij} = \begin{cases} \frac{1}{2}(\cot \alpha_{ij} + \cot \beta_{ij}) & ij \text{ is an edge, that is } j \in N(i), \\ -\sum\limits_{k \in N(i)}C_{ik} & i = j, \\ 0 & \text{otherwise} \end{cases} </math> where <math>N(i) </math> denotes the neighborhood of <math> i</math>, and let <math> M </math> be the diagonal ''mass matrix'' <math> M </math> whose <math>i</math>-th entry along the diagonal is the vertex area <math> A_i </math>. Then <math> L=M^{-1}C </math> is the sought discretization of the Laplacian. A more general overview of mesh operators is given in.<ref name="reuter06">{{cite journal |last1= Reuter |first1=M. |last2=Biasotti |first2=S. |last3=Giorgi |first3=D. |last4=Patane |first4=G. |last5=Spagnuolo |first5=M. | year = 2009 | title = Discrete Laplace–Beltrami operators for shape analysis and segmentation | journal = Computers & Graphics | volume = 33 | issue = 3 | pages = 381–390df | doi=10.1016/j.cag.2009.03.005 | citeseerx = 10.1.1.157.757 }}</ref> === Finite differences === Approximations of the [[Laplacian]], obtained by the [[finite-difference method]] or by the [[finite-element method]], can also be called '''discrete Laplacians'''. For example, the Laplacian in two dimensions can be approximated using the [[five-point stencil]] finite-difference method, resulting in :<math> \Delta f(x,y) \approx \frac{f(x-h,y) + f(x+h,y) + f(x,y-h) + f(x,y+h) - 4f(x,y)}{h^2}, </math> where the grid size is ''h'' in both dimensions, so that the five-point stencil of a point (''x'', ''y'') in the grid is :<math>\{(x-h, y), (x, y), (x+h, y), (x, y-h), (x, y+h)\}.</math> If the grid size ''h'' = 1, the result is the '''negative''' discrete Laplacian on the graph, which is the [[square lattice|square lattice grid]]. There are no constraints here on the values of the function ''f''(''x'', ''y'') on the boundary of the lattice grid, thus this is the case of no source at the boundary, that is, a no-flux boundary condition (aka, insulation, or homogeneous [[Neumann boundary condition]]). The control of the state variable at the boundary, as ''f''(''x'', ''y'') given on the boundary of the grid (aka, [[Dirichlet boundary condition]]), is rarely used for graph Laplacians, but is common in other applications. Multidimensional discrete Laplacians on [[Cuboid#Rectangular cuboid|rectangular cuboid]] [[regular grid]]s have very special properties, e.g., they are [[Kronecker product#Kronecker sum and exponentiation|Kronecker sums]] of one-dimensional discrete Laplacians, see [[Kronecker sum of discrete Laplacians]], in which case all its [[eigenvalue]]s and [[eigenvectors]] can be explicitly calculated. ===Finite-element method=== In this approach, the domain is discretized into smaller elements, often triangles or tetrahedra, but other elements such as rectangles or cuboids are possible. The solution space is then approximated using so called form-functions of a pre-defined degree. The differential equation containing the Laplace operator is then transformed into a variational formulation, and a system of equations is constructed (linear or eigenvalue problems). The resulting matrices are usually very sparse and can be solved with iterative methods. ===Image processing=== Discrete Laplace operator is often used in image processing e.g. in edge detection and motion estimation applications.<ref name="forsyth03">{{cite journal |author1=Forsyth, D. A. |author2=Ponce, J. | year = 2003 | title = Computer Vision |journal=Computers & Graphics |volume=33 |issue=3 |pages=381–390 | doi=10.1016/j.cag.2009.03.005 |citeseerx=10.1.1.157.757 }}</ref> The discrete Laplacian is defined as the [[Laplace operator#Coordinate expressions|sum of the second derivatives]] and calculated as sum of differences over the nearest neighbours of the central pixel. Since derivative filters are often sensitive to noise in an image, the Laplace operator is often preceded by a smoothing filter (such as a Gaussian filter) in order to remove the noise before calculating the derivative. The smoothing filter and Laplace filter are often combined into a single filter.<ref>{{Cite web|url=https://academic.mu.edu/phys/matthysd/web226/Lab02.htm|title=LoG Filter|last=Matthys|first=Don|date=Feb 14, 2001|website=Marquette University|access-date=2019-12-01}}</ref> ====Implementation via operator discretization==== For one-, two- and three-dimensional signals, the discrete Laplacian can be given as [[convolution]] with the following kernels: :1D filter: <math>\vec{D}^2_x=\begin{bmatrix}1 & -2 & 1\end{bmatrix}</math>, :2D filter: <math>\mathbf{D}^2_{xy}=\begin{bmatrix}0 & 1 & 0\\1 & -4 & 1\\0 & 1 & 0\end{bmatrix}</math>. <math>\mathbf{D}^2_{xy}</math> corresponds to the ([[Five-point stencil]]) finite-difference formula seen previously. It is stable for very smoothly varying fields, but for equations with rapidly varying solutions a more stable and isotropic form of the Laplacian operator is required,<ref name="Provatas Elder p. ">{{cite book | last1=Provatas | first1=Nikolas | last2=Elder | first2=Ken | title=Phase-Field Methods in Materials Science and Engineering | publisher=Wiley-VCH Verlag GmbH & Co. KGaA | publication-place=Weinheim, Germany | date=2010-10-13 | isbn=978-3-527-63152-0 | url=http://www.physics.mcgill.ca/~provatas/papers/Phase_Field_Methods_text.pdf | doi=10.1002/9783527631520 | page=219}}</ref> such as the [[nine-point stencil]], which includes the diagonals: :2D filter: <math>\mathbf{D}^2_{xy}=\begin{bmatrix}0.25 & 0.5 & 0.25\\0.5 & -3 & 0.5\\0.25 & 0.5 & 0.25\end{bmatrix}</math>, :3D filter: <math>\mathbf{D}^2_{xyz}</math> using [[seven-point stencil]] is given by: ::first plane = <math>\begin{bmatrix}0 & 0 & 0\\0 & 1 & 0\\0 & 0 & 0\end{bmatrix}</math>; second plane = <math>\begin{bmatrix}0 & 1 & 0\\1 & -6 & 1\\0 & 1 & 0\end{bmatrix}</math>; third plane = <math>\begin{bmatrix}0 & 0 & 0\\0 & 1 & 0\\0 & 0 & 0\end{bmatrix}</math>. :and using [[27-point stencil]] by:<ref name="OReilly2006">{{cite journal |last1=O'Reilly |first1=H. |last2=Beck |first2=Jeffrey M. |title=A Family of Large-Stencil Discrete Laplacian Approximations in Three Dimensions |journal=International Journal for Numerical Methods in Engineering |year=2006 |pages=1–16 |url=http://psych.colorado.edu/~oreilly/papers/OReillyBeckIP_lapl.pdf }}</ref> ::first plane = <math>\frac{1}{26}\begin{bmatrix}2 & 3 & 2\\3 & 6 & 3\\2 & 3 & 2\end{bmatrix}</math>; second plane = <math>\frac{1}{26}\begin{bmatrix}3 & 6 & 3\\6 & -88 & 6\\3 & 6 & 3\end{bmatrix}</math>; third plane = <math>\frac{1}{26}\begin{bmatrix}2 & 3 & 2\\3 & 6 & 3\\2 & 3 & 2\end{bmatrix}</math>. :''{{var|n}}D filter'': For the element <math>a_{x_1, x_2, \dots , x_n}</math> of the kernel <math>\mathbf{D}^2_{x_1, x_2, \dots , x_n},</math> ::<math>a_{x_1, x_2, \dots , x_n} = \left\{\begin{array}{ll} -2n & \text{if } s = n, \\ 1 & \text{if } s = n - 1, \\ 0 & \text{otherwise,} \end{array}\right.</math> :where {{math|{{var|x}}{{sub|{{var|i}}}}}} is the position (either {{math|−1}}, {{math|0}} or {{math|1}}) of the element in the kernel in the {{var|i}}-th direction, and {{math|{{var|s}}}} is the number of directions {{math|{{var|i}}}} for which {{math|{{var|x}}{{sub|{{var|i}}}} {{=}} 0}}. Note that the ''n''D version, which is based on the graph generalization of the Laplacian, assumes all neighbors to be at an equal distance, and hence leads to the following 2D filter with diagonals included, rather than the version above: :2D filter: <math>\mathbf{D}^2_{xy}=\begin{bmatrix}1 & 1 & 1\\1 & -8 & 1\\1 & 1 & 1\end{bmatrix}.</math> These kernels are deduced by using discrete differential quotients. It can be shown<ref name=lin90>[http://kth.diva-portal.org/smash/record.jsf?pid=diva2%3A472968&dswid=-3163 Lindeberg, T., "Scale-space for discrete signals", PAMI(12), No. 3, March 1990, pp. 234–254.]</ref><ref name=lin94>[http://www.csc.kth.se/~tony/book.html Lindeberg, T., Scale-Space Theory in Computer Vision, Kluwer Academic Publishers, 1994], {{isbn|0-7923-9418-6}}.</ref> that the following discrete approximation of the two-dimensional Laplacian operator as a convex combination of difference operators :<math>\nabla^2_{\gamma}= (1 - \gamma) \nabla^2_{5} + \gamma \nabla ^2_{\times} = (1 - \gamma) \begin{bmatrix}0 & 1 & 0\\1 & -4 & 1\\0 & 1 & 0\end{bmatrix} + \gamma \begin{bmatrix}1/2 & 0 & 1/2\\0 & -2 & 0\\1/2 & 0 & 1/2\end{bmatrix} </math> for γ ∈ [0, 1] is compatible with discrete scale-space properties, where specifically the value γ = 1/3 gives the best approximation of rotational symmetry.<ref name=lin90/><ref name=lin94/><ref name="PatraKarttunen2006">{{cite journal|last1=Patra|first1=Michael|last2=Karttunen|first2=Mikko|title=Stencils with isotropic discretization error for differential operators|journal=Numerical Methods for Partial Differential Equations|volume=22|issue=4|year=2006|pages=936–953|issn=0749-159X|doi=10.1002/num.20129|s2cid=123145969 }}</ref> Regarding three-dimensional signals, it is shown<ref name=lin94/> that the Laplacian operator can be approximated by the two-parameter family of difference operators :<math> \nabla^2_{\gamma_1,\gamma_2} = (1 - \gamma_1 - \gamma_2) \, \nabla_7^2 + \gamma_1 \, \nabla_{+^3}^2 + \gamma_2 \, \nabla_{\times^3}^2 ), </math> where :<math> (\nabla_7^2 f)_{0, 0, 0} = f_{-1, 0, 0} + f_{+1, 0, 0} + f_{0, -1, 0} + f_{0, +1, 0} + f_{0, 0, -1} + f_{0, 0, +1} - 6 f_{0, 0, 0}, </math> :<math> (\nabla_{+^3}^2 f)_{0, 0, 0} = \frac{1}{4} (f_{-1, -1, 0} + f_{-1, +1, 0} + f_{+1, -1, 0} + f_{+1, +1, 0} + f_{-1, 0, -1} + f_{-1, 0, +1} + f_{+1, 0, -1} + f_{+1, 0, +1} + f_{0, -1, -1} + f_{0, -1, +1} + f_{0, +1, -1} + f_{0, +1, +1} - 12 f_{0, 0, 0}), </math> :<math> (\nabla_{\times^3}^2 f)_{0, 0, 0} = \frac{1}{4} (f_{-1, -1, -1} + f_{-1, -1, +1} + f_{-1, +1, -1} + f_{-1, +1, +1} + f_{+1, -1, -1} + f_{+1, -1, +1} + f_{+1, +1, -1} + f_{+1, +1, +1} - 8 f_{0, 0, 0}). </math> It can be shown by Taylor series analysis that combinations of values of <math>\gamma_1</math> and <math>\gamma_2</math> for which <math>3\gamma_1 + 6\gamma_2 = 2</math> give the best approximations of rotational symmetry. ====Implementation via continuous reconstruction==== A discrete signal, comprising images, can be viewed as a discrete representation of a continuous function <math>f(\bar r)</math>, where the coordinate vector <math>\bar r \in R^n </math> and the value domain is real <math>f\in R</math>. Derivation operation is therefore directly applicable to the continuous function, <math>f</math>. In particular any discrete image, with reasonable presumptions on the discretization process, e.g. assuming band limited functions, or wavelets expandable functions, etc. can be reconstructed by means of well-behaving interpolation functions underlying the reconstruction formulation,<ref name="bigun06vd">{{cite book |author1=Bigun, J. | year = 2006 | title = Vision with Direction | publisher = Springer | doi=10.1007/b138918 | isbn = 978-3-540-27322-6 }}</ref> :<math> f(\bar r)=\sum_{k\in K}f_k \mu_k(\bar r) </math> where <math>f_k\in R</math> are discrete representations of <math>f</math> on grid <math>K</math> and <math>\mu_k </math> are interpolation functions specific to the grid <math>K</math>. On a uniform grid, such as images, and for bandlimited functions, interpolation functions are shift invariant amounting to <math>\mu_k(\bar r)= \mu(\bar r-\bar r_k) </math> with <math>\mu </math> being an appropriately dilated [[sinc function]] defined in <math>n</math>-dimensions i.e. <math>\bar r=(x_1,x_2...x_n)^T</math>. Other approximations of <math>\mu</math> on uniform grids, are appropriately dilated [[Gaussian function]]s in <math>n</math>-dimensions. Accordingly, the discrete Laplacian becomes a discrete version of the Laplacian of the continuous <math>f(\bar r)</math> :<math> \nabla^2 f(\bar r_k)= \sum_{k'\in K}f_{k'} (\nabla^2 \mu(\bar r-\bar r_{k'}))|_{\bar r= \bar r_k} </math> which in turn is a convolution with the Laplacian of the interpolation function on the uniform (image) grid <math>K</math>. An advantage of using Gaussians as interpolation functions is that they yield linear operators, including Laplacians, that are free from rotational artifacts of the coordinate frame in which <math>f</math> is represented via <math>f_k</math>, in <math>n</math>-dimensions, and are frequency aware by definition. A linear operator has not only a limited range in the <math>\bar r</math> domain but also an effective range in the frequency domain (alternatively Gaussian scale space) which can be controlled explicitly via the variance of the Gaussian in a principled manner. The resulting filtering can be implemented by separable filters and [[decimation (signal processing)]]/[[pyramid (image processing)]] representations for further computational efficiency in <math>n</math>-dimensions. In other words, the discrete Laplacian filter of any size can be generated conveniently as the sampled Laplacian of Gaussian with spatial size befitting the needs of a particular application as controlled by its variance. Monomials which are non-linear operators can also be implemented using a similar reconstruction and approximation approach provided that the signal is sufficiently over-sampled. Thereby, such non-linear operators e.g. [[Structure Tensor]], and [[Generalized Structure Tensor]] which are used in pattern recognition for their total least-square optimality in orientation estimation, can be realized.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)