GeometricMeanFilter
✖
GeometricMeanFilter
filters data by replacing every value by the geometric mean value in its range-r neighborhood.
Details

- GeometricMeanFilter is used to locally smooth data by using geometric mean as opposed to arithmetic mean, where the amount of smoothing is dependent on the value of r.
- The function applied to each range-r neighborhood is GeometricMean.
- 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 - For multichannel images and audio signals, GeometricMeanFilter operates separately on each channel.
- GeometricMeanFilter[data,{r1,r2,…}] computes the geometric mean value in
blocks centered on each sample.
- GeometricMeanFilter assumes the index coordinate system for lists and images.
- At the data boundaries, GeometricMeanFilter uses smaller neighborhoods.


Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Geometric mean filtering of a list:

https://wolfram.com/xid/0bh1qzixdnik9m-la5ph

Filter a TimeSeries:

https://wolfram.com/xid/0bh1qzixdnik9m-fx6jf7

https://wolfram.com/xid/0bh1qzixdnik9m-g9fo2


https://wolfram.com/xid/0bh1qzixdnik9m-dulvtd

Geometric mean filtering of an image:

https://wolfram.com/xid/0bh1qzixdnik9m-6y1vk2

Scope (12)Survey of the scope of standard use cases
Data (7)
Apply a moving geometric mean filter to a vector:

https://wolfram.com/xid/0bh1qzixdnik9m-s47pnq

Geometric mean filtering of a 2D array:

https://wolfram.com/xid/0bh1qzixdnik9m-cxywqj


https://wolfram.com/xid/0bh1qzixdnik9m-jopin9

Filter an Audio signal:

https://wolfram.com/xid/0bh1qzixdnik9m-dflgzt

https://wolfram.com/xid/0bh1qzixdnik9m-em7h2s


https://wolfram.com/xid/0bh1qzixdnik9m-ndwk9g

Filtering a 2D grayscale image:

https://wolfram.com/xid/0bh1qzixdnik9m-dc0gtv

Geometric mean filtering of a 3D volume:

https://wolfram.com/xid/0bh1qzixdnik9m-6jwd04


https://wolfram.com/xid/0bh1qzixdnik9m-f3jfe5

Parameters (5)
Specify one radius to be used in all directions:

https://wolfram.com/xid/0bh1qzixdnik9m-tlzgi7

Increasing the radius will result in smoother images:

https://wolfram.com/xid/0bh1qzixdnik9m-ibus74

Geometric mean filtering just in the first direction:

https://wolfram.com/xid/0bh1qzixdnik9m-gdx3zh


https://wolfram.com/xid/0bh1qzixdnik9m-hzoyls

Geometric mean filtering of a 3D image in the vertical direction only:

https://wolfram.com/xid/0bh1qzixdnik9m-37xttb

Filtering of the horizontal planes only:

https://wolfram.com/xid/0bh1qzixdnik9m-5u7xo

Use a quantity parameter with a TimeSeries input:

https://wolfram.com/xid/0bh1qzixdnik9m-icrqve


https://wolfram.com/xid/0bh1qzixdnik9m-l1vae5

Applications (3)Sample problems that can be solved with this function
Use GeometricMeanFilter to smooth a positive-valued time series and identify the trend:

https://wolfram.com/xid/0bh1qzixdnik9m-djyxka

https://wolfram.com/xid/0bh1qzixdnik9m-5bdacu

https://wolfram.com/xid/0bh1qzixdnik9m-b97dk3

Reduce noise using geometric mean filtering:

https://wolfram.com/xid/0bh1qzixdnik9m-hb1cuf

Unsharp masking using geometric mean filtering:

https://wolfram.com/xid/0bh1qzixdnik9m-jekwvj

Properties & Relations (3)Properties of the function, and connections to other functions
For positive data, HarmonicMeanFilter[data,r]≤GeometricMeanFilter[data,r]≤MeanFilter[data,r]:

https://wolfram.com/xid/0bh1qzixdnik9m-i40d86

Geometric mean filtering is the same as ArrayFilter with function GeometricMean:

https://wolfram.com/xid/0bh1qzixdnik9m-fns4nv

Geometric mean filtering is the same as ImageFilter with function GeometricMean:

https://wolfram.com/xid/0bh1qzixdnik9m-dhww66

Wolfram Research (2008), GeometricMeanFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/GeometricMeanFilter.html (updated 2016).
Text
Wolfram Research (2008), GeometricMeanFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/GeometricMeanFilter.html (updated 2016).
Wolfram Research (2008), GeometricMeanFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/GeometricMeanFilter.html (updated 2016).
CMS
Wolfram Language. 2008. "GeometricMeanFilter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/GeometricMeanFilter.html.
Wolfram Language. 2008. "GeometricMeanFilter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/GeometricMeanFilter.html.
APA
Wolfram Language. (2008). GeometricMeanFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GeometricMeanFilter.html
Wolfram Language. (2008). GeometricMeanFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GeometricMeanFilter.html
BibTeX
@misc{reference.wolfram_2025_geometricmeanfilter, author="Wolfram Research", title="{GeometricMeanFilter}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/GeometricMeanFilter.html}", note=[Accessed: 29-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_geometricmeanfilter, organization={Wolfram Research}, title={GeometricMeanFilter}, year={2016}, url={https://reference.wolfram.com/language/ref/GeometricMeanFilter.html}, note=[Accessed: 29-March-2025
]}