Geometric mean filter

From Wikipedia, the free encyclopedia

The geometric mean filter is an image filtering process meant to smooth and reduce noise of an image.[1] It is based on the mathematic geometric mean. The output image G(x,y) of a geometric mean is given by

Where S(x,y) is the original image, and the filter mask is m by n pixels.

Each pixel of the output image at point (x,y) is given by the product of the pixels within the geometric mean mask raised to the power of 1/mn. For example, using a mask size of 3 by 3, pixel (x,y) in the output image will be the product of S(x,y) and all 8 of its surrounding pixels raised to the 1/9th power.

Using the following original image with pixel (x,y) at the center:

Gives the result of: (5*16*22*6*3*18*12*3*15)^(1/9) = 8.77.

Code example

References

Related Articles

Wikiwand AI