MinFilter
Details
- MinFilter is a nonlinear filter commonly used to locally smooth data and diminish salt-like noise, where the amount of smoothing is dependent on the value of r.
- The function applied to each range-r neighborhood is Min.
- 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, MinFilter replaces each pixel by a pixel in its neighborhood that has the minimum total intensity, averaged over all channels.
- MinFilter[data,{r1,r2,…}] computes the minimum value in
blocks centered on each sample. - MinFilter assumes the index coordinate system for lists and images.
- At the data boundaries, MinFilter uses smaller neighborhoods.
Examples
open all close allBasic Examples (3)
MinFilter[ {1, 2, 3, 2, 1}, 1]Filter a TimeSeries:
ts = TemporalData[TimeSeries, {{{0., -0.054108337548928784, 0.1280211704499059, 0.28162021808461324,
-0.2057320325139802, -0.4871901025739722, -0.7154387408784426, -0.7399660905024047,
-0.6981022018441507, -0.7178077145466483, -0.8034462541874 ... 7894984276149, 1.8851123992920942, 1.8341759268762767, 2.0335844117979263}},
{{0., 10., 0.1}}, 1, {"Continuous", 1}, {"Continuous", 1}, 1,
{ValueDimensions -> 1, ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}}}, False,
10.];filtered = MinFilter[ts, 0.5]ListLinePlot[{ts, filtered}, PlotLegends -> {"original data", "filtered"}]Minimum filtering of a color image:
MinFilter[[image], 6]Scope (13)
Data (8)
Minimum filtering of a numeric vector:
MinFilter[{0, 3, 8, 2}, 1]MinFilter[ {a, b, c}, 1]Minimum filtering of a 2D array:
MinFilter[(| | | | |
| - | - | - | - |
| 0 | 3 | 8 | 2 |
| 7 | 6 | 9 | 6 |
| 5 | 8 | 4 | 0 |
| 3 | 5 | 1 | 6 |), 1]//MatrixFormMinimum filtering of a list of Quantity objects:
data = {Quantity[9, "Feet"], Quantity[86, "Inches"], Quantity[27.1, "Meters"], Quantity[79, "Feet"], Quantity[90, "Feet"], Quantity[41, "Inches"], Quantity[99, "Inches"], Quantity[6, "Feet"], Quantity[38, "Feet"], Quantity[89, "Feet"], Quantity[53, "Feet"], Quantity[85, "Meters"], Quantity[92, "Meters"], Quantity[95, "Meters"], Quantity[49, "Feet"]};ListLinePlot[{data, MinFilter[data, 2]}, PlotRange -> All]Filter an Audio signal:
a = Import["ExampleData/rule30.wav"];b = MinFilter[a, 35]AudioPlot[{a, b}]Filtering a 2D grayscale image:
MinFilter[[image], 3]MinFilter[Video["ExampleData/fish.mp4"], 2]MinFilter[[image], 2]Parameters (5)
Specify one radius to be used in all directions:
MinFilter[[image], 1]Increasing the radius will result in darker images:
Table[Labeled[MinFilter[[image], r], Text["*r* = " <> ToString@r]], {r, {1, 2, 4}}]Minimum filtering just in the first direction:
MinFilter[[image], {5, 0}]Filtering just in the second direction:
MinFilter[[image], {0, 5}]Minimum filtering of a 3D image in the vertical direction only:
MinFilter[[image], {4, 0, 0}]Filtering of a 3D image in the horizontal planes only:
MinFilter[[image], {0, 4, 4}]Applications (3)
Properties & Relations (2)
For single-channel images, MinFilter is the same as ImageFilter with function Min:
MinFilter[[image], 1] == ImageFilter[Min, [image], 1]For single-channel images, MinFilter is the same as Erosion with a box structuring element:
MinFilter[[image], 1] == Erosion[[image], 1]Tech Notes
History
Introduced in 2008 (7.0) | Updated in 2015 (10.2) ▪ 2016 (11.0) ▪ 2025 (14.3)
Text
Wolfram Research (2008), MinFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/MinFilter.html (updated 2025).
CMS
Wolfram Language. 2008. "MinFilter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/MinFilter.html.
APA
Wolfram Language. (2008). MinFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MinFilter.html
BibTeX
@misc{reference.wolfram_2026_minfilter, author="Wolfram Research", title="{MinFilter}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/MinFilter.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_minfilter, organization={Wolfram Research}, title={MinFilter}, year={2025}, url={https://reference.wolfram.com/language/ref/MinFilter.html}, note=[Accessed: 12-June-2026]}