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!
===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)