LaplacianFilter[data,r]
convolves data with a radius-r Laplacian kernel.
LaplacianFilter[data,{r1,r2,…}]
uses radius ri at level i in data.
LaplacianFilter
LaplacianFilter[data,r]
convolves data with a radius-r Laplacian kernel.
LaplacianFilter[data,{r1,r2,…}]
uses radius ri at level i in data.
Details and Options
- LaplacianFilter is commonly used in image processing to highlight regions of rapid-intensity change by approximating the second spatial derivatives of an image.
- The data can be any of the following:
-
list arbitrary-rank numerical array tseries temporal data such as TimeSeries, TemporalData, … image arbitrary Image or Image3D object audio an Audio object video a Video object - For multichannel images and audio signals, LaplacianFilter operates separately on each channel.
- LaplacianFilter[data,…] by default returns a result of the same dimensions as data.
- The following options can be given:
-
Padding "Fixed" padding method WorkingPrecision Automatic the precision to use - With setting Padding->None, LaplacianFilter[data,…] normally returns a result smaller than data.
Examples
open all close allBasic Examples (2)
Scope (9)
Data (7)
Laplacian filter of a 2D Array:
LaplacianFilter[BoxMatrix[1, 7], 1]//MatrixFormFilter a TimeSeries object:
ts = TemporalData[TimeSeries, {{{0., -0.27267267057145633, -0.6672983789995302, -0.5338541947930846,
-0.6117404489279314, -0.6755527076595494, -0.02125421294486496, -0.10792797291843935,
-0.6138271235477938, -0.3248568606554575, -0.08843449054 ... 2053424, -0.49980440691873723, -0.5388679788215971,
-0.4101602764645551}}, {{0, 1., 0.01}}, 1, {"Continuous", 1}, {"Continuous", 1}, 1,
{ValueDimensions -> 1, ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}}}, False,
10.1];
filtered = LaplacianFilter[ts, 15];
ListLinePlot[{ts, filtered}, PlotLegends -> {"original data", "filtered"}]Filter an Audio signal:
a = AudioGenerator[{"Triangle", 10}];
b = AudioNormalize[LaplacianFilter[a, 10]];
AudioPlot[{a, b}]LaplacianFilter[[image], 2]//ImageAdjustLaplacianFilter[[image], 2]// ImageAdjustLaplacianFilter[Video["ExampleData/fish.mp4"], 3]LaplacianFilter[[image], 1]Parameters (2)
Apply the Laplacian filter in the horizontal direction only:
ImageAdjust[LaplacianFilter[[image], {0, 1}]]Use different radii in the horizontal direction:
ImageAdjust[LaplacianFilter[[image], {0, #}]]& /@ {1, 3, 9}Filter a 3D image in the vertical plane only:
i = [image];
LaplacianFilter[i, {1, 0, 0}]Filtering of the horizontal planes only:
LaplacianFilter[i, {0, 1, 1}]Options (5)
WorkingPrecision (3)
With integer arrays, the machine precision is used by default:
LaplacianFilter[{0, 0, 1, 1, 1, 0, 0}, 1]LaplacianFilter[{0, 0, 1, 1, 1, 0, 0}, 1, WorkingPrecision -> Infinity]With real arrays, the precision of the input is used by default:
LaplacianFilter[{1.0000000000000000000, 2.0000000000000000000, 3.0000000000000000000, 4.0000000000000000000}, 1]LaplacianFilter[{1.0000000000000000000, 2.0000000000000000000, 3.0000000000000000000, 4.0000000000000000000}, 1, WorkingPrecision -> MachinePrecision]WorkingPrecision is ignored when filtering images:
LaplacianFilter[[image], 1, WorkingPrecision -> Infinity]An image of a real type is always returned:
ImageType[%]Padding (2)
Laplacian filtering using different padding schemes:
v = {1, 2, 3, 2, 1, 0, 0, 0};
pad = {"Fixed", "Periodic", "Reflected"};
ListLinePlot[LaplacianFilter[v, 5, Padding -> #]& /@ pad, PlotLegends -> pad, PlotRange -> All]Padding->None returns an image smaller than the input image:
LaplacianFilter[[image], {20, 20}, Padding -> None]Applications (3)
LaplacianFilter[[image], 2]Subtract the Laplacian filter from the original image to emphasize details:
i = [image];
ImageSubtract[i, LaplacianFilter[i, 10]]Get borders from a colored map:
ColorConvert[LaplacianFilter[[image], 1], "Grayscale"]Properties & Relations (3)
LaplacianFilter is a linear filter:
list1 = {1, 1, 1, 1, 1, 0, 0, 3, 2, 1, 0, 0, 0, 0, 0};
list2 = {2, 2, 2, 2, 1, 5, 4, 6, 2, 2, 1, 1, 1, 1, 1};
LaplacianFilter[list1 + list2, 1] == LaplacianFilter[list1, 1] + LaplacianFilter[list2, 1]Impulse response of LaplacianFilter of radius 2:
(ker = LaplacianFilter[ArrayPad[{{1}}, 3], 2])//MatrixFormPerform Laplacian filtering using ImageConvolve:
i = RandomImage[1, 50];
LaplacianFilter[i, 2] == ImageConvolve[i, ker]Laplacian filtering of a binary image gives a real-valued image:
d = Image[DiskMatrix[23, 81], "Bit"]LaplacianFilter[d, 1]//ImageAdjustImageType[%]History
Introduced in 2008 (7.0) | Updated in 2012 (9.0) ▪ 2014 (10.0) ▪ 2016 (11.0) ▪ 2025 (14.3)
Text
Wolfram Research (2008), LaplacianFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/LaplacianFilter.html (updated 2025).
CMS
Wolfram Language. 2008. "LaplacianFilter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/LaplacianFilter.html.
APA
Wolfram Language. (2008). LaplacianFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LaplacianFilter.html
BibTeX
@misc{reference.wolfram_2026_laplacianfilter, author="Wolfram Research", title="{LaplacianFilter}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/LaplacianFilter.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_laplacianfilter, organization={Wolfram Research}, title={LaplacianFilter}, year={2025}, url={https://reference.wolfram.com/language/ref/LaplacianFilter.html}, note=[Accessed: 12-June-2026]}