Geometric mean filter

Last updated

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

Contents

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:

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

Application

The geometric mean filter is most widely used to filter out Gaussian noise. In general it will help smooth the image with less data loss than an arithmetic mean filter. [1]

Code example

The following code shows the application of a geometric mean filter to an image using MATLAB.

 1 %Applies geometric mean filter to image input_noise that has added gaussian noise 2  3 [m,n]=size(input_noise); 4 output=zeros(m,n);%output image set with placeholder values of all zeros 5 val=1;%variable to hold new pixel value 6  7 fori=2:m-2%loop through each pixel in original image 8 forj=2:n-2%compute geometric mean of 3x3 window around pixel 9 p=input_noise(i-1,j-1);10 q=input_noise(i-1,j);11 r=input_noise(i-1,j+1);12 s=input_noise(i,j-1);13 t=input_noise(i,j);14 u=input_noise(i,j+1);15 v=input_noise(i+1,j-1);16 w=input_noise(i+1,j);17 x=input_noise(i+1,j+1);18 19 val=(p*q*r*s*t*u*v*w*x) ^ (1/9);20 output(i,j)=val;%set output pixel to computed geometric mean21 val=1;%reset val for next pixel22 end23 end
Input image with added gaussian noise GMF noise3.tif
Input image with added gaussian noise
Output image after filter GMF out2.tif
Output image after filter

Related Research Articles

White noise random signal having equal intensity at different frequencies, giving it a constant power spectral density

In signal processing, white noise is a random signal having equal intensity at different frequencies, giving it a constant power spectral density. The term is used, with this or similar meanings, in many scientific and technical disciplines, including physics, acoustical engineering, telecommunications, and statistical forecasting. White noise refers to a statistical model for signals and signal sources, rather than to any specific signal. White noise draws its name from white light, although light that appears white generally does not have a flat power spectral density over the visible band.

Kalman filter Algorithm that estimates unknowns from a series of measurements over time

In statistics and control theory, Kalman filtering, also known as linear quadratic estimation (LQE), is an algorithm that uses a series of measurements observed over time, containing statistical noise and other inaccuracies, and produces estimates of unknown variables that tend to be more accurate than those based on a single measurement alone, by estimating a joint probability distribution over the variables for each timeframe. The filter is named after Rudolf E. Kálmán, one of the primary developers of its theory.

Additive white Gaussian noise (AWGN) is a basic noise model used in Information theory to mimic the effect of many random processes that occur in nature. The modifiers denote specific characteristics:

Edge detection includes a variety of mathematical methods that aim at identifying points in a digital image at which the image brightness changes sharply or, more formally, has discontinuities. The points at which image brightness changes sharply are typically organized into a set of curved line segments termed edges. The same problem of finding discontinuities in one-dimensional signals is known as step detection and the problem of finding signal discontinuities over time is known as change detection. Edge detection is a fundamental tool in image processing, machine vision and computer vision, particularly in the areas of feature detection and feature extraction.

Canny edge detector

The Canny edge detector is an edge detection operator that uses a multi-stage algorithm to detect a wide range of edges in images. It was developed by John F. Canny in 1986. Canny also produced a computational theory of edge detection explaining why the technique works.

Discrete wavelet transform transform in numerical harmonic analysis

In numerical analysis and functional analysis, a discrete wavelet transform (DWT) is any wavelet transform for which the wavelets are discretely sampled. As with other wavelet transforms, a key advantage it has over Fourier transforms is temporal resolution: it captures both frequency and location information.

In signal processing, a matched filter is obtained by correlating a known delayed signal, or template, with an unknown signal to detect the presence of the template in the unknown signal. This is equivalent to convolving the unknown signal with a conjugated time-reversed version of the template. The matched filter is the optimal linear filter for maximizing the signal-to-noise ratio (SNR) in the presence of additive stochastic noise.

In signal processing, the Wiener filter is a filter used to produce an estimate of a desired or target random process by linear time-invariant (LTI) filtering of an observed noisy process, assuming known stationary signal and noise spectra, and additive noise. The Wiener filter minimizes the mean square error between the estimated random process and the desired process.

Gaussian blur Visual effect

In image processing, a Gaussian blur is the result of blurring an image by a Gaussian function. It is a widely used effect in graphics software, typically to reduce image noise and reduce detail. The visual effect of this blurring technique is a smooth blur resembling that of viewing the image through a translucent screen, distinctly different from the bokeh effect produced by an out-of-focus lens or the shadow of an object under usual illumination. Gaussian smoothing is also used as a pre-processing stage in computer vision algorithms in order to enhance image structures at different scales—see scale space representation and scale space implementation.

Median filter

The Median Filter is a non-linear digital filtering technique, often used to remove noise from an image or signal. Such noise reduction is a typical pre-processing step to improve the results of later processing. Median filtering is very widely used in digital image processing because, under certain conditions, it preserves edges while removing noise, also having applications in signal processing.

In imaging science, difference of Gaussians (DoG) is a feature enhancement algorithm that involves the subtraction of one blurred version of an original image from another, less blurred version of the original. In the simple case of grayscale images, the blurred images are obtained by convolving the original grayscale images with Gaussian kernels having differing standard deviations. Blurring an image using a Gaussian kernel suppresses only high-frequency spatial information. Subtracting one image from the other preserves spatial information that lies between the range of frequencies that are preserved in the two blurred images. Thus, the difference of Gaussians is a band-pass filter that discards all but a handful of spatial frequencies that are present in the original grayscale image.

Corner detection

Corner detection is an approach used within computer vision systems to extract certain kinds of features and infer the contents of an image. Corner detection is frequently used in motion detection, image registration, video tracking, image mosaicing, panorama stitching, 3D modelling and object recognition. Corner detection overlaps with the topic of interest point detection.

The linear scale-space representation of an N-dimensional continuous signal,

Mean shift Algorithm used to determine the modes of distribution of probability of a dataset

Mean shift is a non-parametric feature-space analysis technique for locating the maxima of a density function, a so-called mode-seeking algorithm. Application domains include cluster analysis in computer vision and image processing.

In computer vision, speeded up robust features (SURF) is a patented local feature detector and descriptor. It can be used for tasks such as object recognition, image registration, classification, or 3D reconstruction. It is partly inspired by the scale-invariant feature transform (SIFT) descriptor. The standard version of SURF is several times faster than SIFT and claimed by its authors to be more robust against different image transformations than SIFT.

Bilateral filter

A bilateral filter is a non-linear, edge-preserving, and noise-reducing smoothing filter for images. It replaces the intensity of each pixel with a weighted average of intensity values from nearby pixels. This weight can be based on a Gaussian distribution. Crucially, the weights depend not only on Euclidean distance of pixels, but also on the radiometric differences. This preserves sharp edges.

In image processing, a kernel, convolution matrix, or mask is a small matrix. It is used for blurring, sharpening, embossing, edge detection, and more. This is accomplished by doing a convolution between a kernel and an image.

Kuwahara filter

The Kuwahara filter is a non-linear smoothing filter used in image processing for adaptive noise reduction. Most filters that are used for image smoothing are linear low-pass filters that effectively reduce noise but also blur out the edges. However the Kuwahara filter is able to apply smoothing on the image while preserving the edges.

In signal processing, multidimensional discrete convolution refers to the mathematical operation between two functions f and g on an n-dimensional lattice that produces a third function, also of n-dimensions. Multidimensional discrete convolution is the discrete analog of the multidimensional convolution of functions on Euclidean space. It is also a special case of convolution on groups when the group is the group of n-tuples of integers.

In image analysis, the average with limited data validity is an image filter for feature-preserving noise removal, consisting in a smoothing filter that only involves pixels satisfying some validity criterion. If some feature of noise elements is known, it is possible to use it to define a criterion to detect invalid pixels, and selectively smooth only invalid pixels using data coming only from valid pixels, thus avoiding to affect other features of the image.

References

  1. 1 2 Gonzalez, Rafael (2002). Digital Image Processing 3nd Edition. Prentice Hall. pp. 232–233. ISBN   0201180758.