HOME

TheInfoList



OR:

In
image processing An image is a visual representation of something. It can be two-dimensional, three-dimensional, or somehow otherwise feed into the visual system to convey information. An image can be an artifact, such as a photograph or other two-dimensiona ...
, a Gabor filter, named after
Dennis Gabor Dennis Gabor ( ; hu, Gábor Dénes, ; 5 June 1900 – 9 February 1979) was a Hungarian-British electrical engineer and physicist, most notable for inventing holography, for which he later received the 1971 Nobel Prize in Physics. He obtaine ...
, is a
linear filter Linear filters process time-varying input signals to produce output signals, subject to the constraint of linearity. In most cases these linear filters are also time invariant (or shift invariant) in which case they can be analyzed exactly using ...
used for
texture Texture may refer to: Science and technology * Surface texture, the texture means smoothness, roughness, or bumpiness of the surface of an object * Texture (roads), road surface characteristics with waves shorter than road roughness * Texture ...
analysis, which essentially means that it analyzes whether there is any specific frequency content in the image in specific directions in a localized region around the point or region of analysis. Frequency and orientation representations of Gabor filters are claimed by many contemporary vision scientists to be similar to those of the human visual system. They have been found to be particularly appropriate for texture representation and discrimination. In the spatial domain, a 2-D Gabor filter is a
Gaussian Carl Friedrich Gauss (1777–1855) is the eponym of all of the topics listed below. There are over 100 topics all named after this German mathematician and scientist, all in the fields of mathematics, physics, and astronomy. The English eponymo ...
kernel function In operator theory, a branch of mathematics, a positive-definite kernel is a generalization of a positive-definite function or a positive-definite matrix. It was first introduced by James Mercer in the early 20th century, in the context of solving ...
modulated by a
sinusoidal A sine wave, sinusoidal wave, or just sinusoid is a mathematical curve defined in terms of the '' sine'' trigonometric function, of which it is the graph. It is a type of continuous wave and also a smooth periodic function. It occurs often in m ...
plane wave In physics, a plane wave is a special case of wave or field: a physical quantity whose value, at any moment, is constant through any plane that is perpendicular to a fixed direction in space. For any position \vec x in space and any time t, th ...
(see
Gabor transform The Gabor transform, named after Dennis Gabor, is a special case of the short-time Fourier transform. It is used to determine the sinusoidal frequency and phase content of local sections of a signal as it changes over time. The function to be tran ...
). Some authors claim that simple cells in the
visual cortex The visual cortex of the brain is the area of the cerebral cortex that processes visual information. It is located in the occipital lobe. Sensory input originating from the eyes travels through the lateral geniculate nucleus in the thalamus and ...
of
mammalian brain A brain is an organ that serves as the center of the nervous system in all vertebrate and most invertebrate animals. It is located in the head, usually close to the sensory organs for senses such as vision. It is the most complex organ in a v ...
s can be modeled by Gabor functions. Thus,
image analysis Image analysis or imagery analysis is the extraction of meaningful information from images; mainly from digital images by means of digital image processing techniques. Image analysis tasks can be as simple as reading bar coded tags or as sophi ...
with Gabor filters is thought by some to be similar to perception in the human visual system.


Definition

Its
impulse response In signal processing and control theory, the impulse response, or impulse response function (IRF), of a dynamic system is its output when presented with a brief input signal, called an Dirac delta function, impulse (). More generally, an impulse ...
is defined by a
sinusoidal A sine wave, sinusoidal wave, or just sinusoid is a mathematical curve defined in terms of the '' sine'' trigonometric function, of which it is the graph. It is a type of continuous wave and also a smooth periodic function. It occurs often in m ...
wave (a
plane wave In physics, a plane wave is a special case of wave or field: a physical quantity whose value, at any moment, is constant through any plane that is perpendicular to a fixed direction in space. For any position \vec x in space and any time t, th ...
for 2-D Gabor filters) multiplied by a
Gaussian function In mathematics, a Gaussian function, often simply referred to as a Gaussian, is a function of the base form f(x) = \exp (-x^2) and with parametric extension f(x) = a \exp\left( -\frac \right) for arbitrary real constants , and non-zero . It is n ...
. Because of the multiplication-convolution property (
Convolution theorem In mathematics, the convolution theorem states that under suitable conditions the Fourier transform of a convolution of two functions (or signals) is the pointwise product of their Fourier transforms. More generally, convolution in one domain (e.g. ...
), the
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of a Gabor filter's impulse response is the
convolution In mathematics (in particular, functional analysis), convolution is a operation (mathematics), mathematical operation on two function (mathematics), functions ( and ) that produces a third function (f*g) that expresses how the shape of one is ...
of the Fourier transform of the harmonic function (sinusoidal function) and the Fourier transform of the Gaussian function. The filter has a
real Real may refer to: Currencies * Brazilian real (R$) * Central American Republic real * Mexican real * Portuguese real * Spanish real * Spanish colonial real Music Albums * ''Real'' (L'Arc-en-Ciel album) (2000) * ''Real'' (Bright album) (2010) ...
and an imaginary component representing
orthogonal In mathematics, orthogonality is the generalization of the geometric notion of ''perpendicularity''. By extension, orthogonality is also used to refer to the separation of specific features of a system. The term also has specialized meanings in ...
directions. The two components may be formed into a
complex number In mathematics, a complex number is an element of a number system that extends the real numbers with a specific element denoted , called the imaginary unit and satisfying the equation i^= -1; every complex number can be expressed in the form ...
or used individually. Complex :g(x,y;\lambda,\theta,\psi,\sigma,\gamma) = \exp\left(-\frac\right)\exp\left(i\left(2\pi\frac+\psi\right)\right) Real :g(x,y;\lambda,\theta,\psi,\sigma,\gamma) = \exp\left(-\frac\right)\cos\left(2\pi\frac+\psi\right) Imaginary :g(x,y;\lambda,\theta,\psi,\sigma,\gamma) = \exp\left(-\frac\right)\sin\left(2\pi\frac+\psi\right) where x' = x \cos\theta + y \sin\theta and y' = -x \sin\theta + y \cos\theta. In this equation, \lambda represents the wavelength of the sinusoidal factor, \theta represents the orientation of the normal to the parallel stripes of a
Gabor function In applied mathematics, Gabor atoms, or Gabor functions, are functions used in the analysis proposed by Dennis Gabor in 1946 in which a family of functions is built from translations and modulations of a generating function. Overview In 1946, Den ...
, \psi is the phase offset, \sigma is the sigma/standard deviation of the Gaussian envelope and \gamma is the spatial aspect ratio, and specifies the ellipticity of the support of the Gabor function.


Wavelet space

Gabor filters are directly related to
Gabor wavelet Gabor wavelets are wavelets invented by Dennis Gabor using complex functions constructed to serve as a basis for Fourier transforms in information theory applications. They are very similar to Morlet wavelets. They are also closely related to Gabo ...
s, since they can be designed for a number of dilations and rotations. However, in general, expansion is not applied for Gabor wavelets, since this requires computation of bi-orthogonal wavelets, which may be very time-consuming. Therefore, usually, a filter bank consisting of Gabor filters with various scales and rotations is created. The filters are convolved with the signal, resulting in a so-called Gabor space. This process is closely related to processes in the primary
visual cortex The visual cortex of the brain is the area of the cerebral cortex that processes visual information. It is located in the occipital lobe. Sensory input originating from the eyes travels through the lateral geniculate nucleus in the thalamus and ...
. Jones and Palmer showed that the real part of the complex Gabor function is a good fit to the receptive field weight functions found in simple cells in a cat's striate cortex.


Extraction of features from images

A set of Gabor filters with different frequencies and orientations may be helpful for extracting useful features from an image. In the discrete domain, two-dimensional Gabor filters are given by, :G_c ,j= B e^ \cos(2\pi f(i\cos\theta+j\sin\theta)) :G_s ,j= C e^ \sin(2\pi f(i\cos\theta+j\sin\theta)) where ''B'' and ''C'' are normalizing factors to be determined. 2-D Gabor filters have rich applications in image processing, especially in
feature extraction In machine learning, pattern recognition, and image processing, feature extraction starts from an initial set of measured data and builds derived values (features) intended to be informative and non-redundant, facilitating the subsequent learning a ...
for texture analysis and segmentation. f defines the frequency being looked for in the texture. By varying \theta, we can look for texture oriented in a particular direction. By varying \sigma, we change the support of the basis or the size of the image region being analyzed.


Applications of 2-D Gabor filters in image processing

In document image processing, Gabor features are ideal for identifying the script of a word in a multilingual document. Gabor filters with different frequencies and with orientations in different directions have been used to localize and extract text-only regions from complex document images (both gray and colour), since text is rich in high frequency components, whereas pictures are relatively smooth in nature. It has also been applied for facial expression recognition Gabor filters have also been widely used in pattern analysis applications. For example, it has been used to study the directionality distribution inside the porous spongy
trabecular A trabecula (plural trabeculae, from Latin for "small beam") is a small, often microscopic, tissue element in the form of a small beam, strut or rod that supports or anchors a framework of parts within a body or organ. A trabecula generally has ...
bone A bone is a Stiffness, rigid Organ (biology), organ that constitutes part of the skeleton in most vertebrate animals. Bones protect the various other organs of the body, produce red blood cell, red and white blood cells, store minerals, provid ...
in the spine. The Gabor space is very useful in
image processing An image is a visual representation of something. It can be two-dimensional, three-dimensional, or somehow otherwise feed into the visual system to convey information. An image can be an artifact, such as a photograph or other two-dimensiona ...
applications such as
optical character recognition Optical character recognition or optical character reader (OCR) is the electronic or mechanical conversion of images of typed, handwritten or printed text into machine-encoded text, whether from a scanned document, a photo of a document, a scen ...
,
iris recognition Iris recognition is an automated method of biometric identification that uses mathematical pattern-recognition techniques on video images of one or both of the irises of an individual's eyes, whose complex patterns are unique, stable, and can b ...
and
fingerprint recognition A fingerprint is an impression left by the friction ridges of a human finger. The recovery of partial fingerprints from a crime scene is an important method of forensic science. Moisture and grease on a finger result in fingerprints on surfac ...
. Relations between activations for a specific spatial location are very distinctive between objects in an image. Furthermore, important activations can be extracted from the Gabor space in order to create a sparse object representation.


Example implementations

This is an example implementation in
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
: import numpy as np def gabor(sigma, theta, Lambda, psi, gamma): """Gabor feature extraction.""" sigma_x = sigma sigma_y = float(sigma) / gamma # Bounding box nstds = 3 # Number of standard deviation sigma xmax = max(abs(nstds * sigma_x * np.cos(theta)), abs(nstds * sigma_y * np.sin(theta))) xmax = np.ceil(max(1, xmax)) ymax = max(abs(nstds * sigma_x * np.sin(theta)), abs(nstds * sigma_y * np.cos(theta))) ymax = np.ceil(max(1, ymax)) xmin = -xmax ymin = -ymax (y, x) = np.meshgrid(np.arange(ymin, ymax + 1), np.arange(xmin, xmax + 1)) # Rotation x_theta = x * np.cos(theta) + y * np.sin(theta) y_theta = -x * np.sin(theta) + y * np.cos(theta) gb = np.exp(-.5 * (x_theta ** 2 / sigma_x ** 2 + y_theta ** 2 / sigma_y ** 2)) * np.cos(2 * np.pi / Lambda * x_theta + psi) return gb For an implementation on images, se

This is an example implementation in
MATLAB MATLAB (an abbreviation of "MATrix LABoratory") is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementation ...
/
Octave In music, an octave ( la, octavus: eighth) or perfect octave (sometimes called the diapason) is the interval between one musical pitch and another with double its frequency. The octave relationship is a natural phenomenon that has been refer ...
: function gb=gabor_fn(sigma, theta, lambda, psi, gamma) sigma_x = sigma; sigma_y = sigma / gamma; % Bounding box nstds = 3; xmax = max(abs(nstds * sigma_x * cos(theta)), abs(nstds * sigma_y * sin(theta))); xmax = ceil(max(1, xmax)); ymax = max(abs(nstds * sigma_x * sin(theta)), abs(nstds * sigma_y * cos(theta))); ymax = ceil(max(1, ymax)); xmin = -xmax; ymin = -ymax; ,y= meshgrid(xmin:xmax, ymin:ymax); % Rotation x_theta = x * cos(theta) + y * sin(theta); y_theta = -x * sin(theta) + y * cos(theta); gb = exp(-.5*(x_theta.^2/sigma_x^2+y_theta.^2/sigma_y^2)).*cos(2*pi/lambda*x_theta+psi); Code for Gabor feature extraction from images in
MATLAB MATLAB (an abbreviation of "MATrix LABoratory") is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementation ...
can be found at http://www.mathworks.com/matlabcentral/fileexchange/44630. This is another example implementation in
Haskell Haskell () is a general-purpose, statically-typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research and industrial applications, Haskell has pioneered a number of programming lan ...
: import Data.Complex gabor λ θ ψ σ γ x y = exp(-(x'^2 + γ^2 * y'^2) / (2*σ^2)) * exp(i * (2*pi*x'/λ + ψ)) where x' = x * cos θ + y * sin θ y' = -x * sin θ + y * cos θ i = 0 :+ 1


See also

*
Gabor transform The Gabor transform, named after Dennis Gabor, is a special case of the short-time Fourier transform. It is used to determine the sinusoidal frequency and phase content of local sections of a signal as it changes over time. The function to be tran ...
*
Gabor wavelet Gabor wavelets are wavelets invented by Dennis Gabor using complex functions constructed to serve as a basis for Fourier transforms in information theory applications. They are very similar to Morlet wavelets. They are also closely related to Gabo ...
*
Gabor atom In applied mathematics, Gabor atoms, or Gabor functions, are functions used in the analysis proposed by Dennis Gabor in 1946 in which a family of functions is built from translations and modulations of a generating function. Overview In 1946, Den ...
*
Log Gabor filter In signal processing it is useful to simultaneously analyze the space and frequency characteristics of a signal. While the Fourier transform gives the frequency information of the signal, it is not localized. This means that we cannot determine whic ...


References


External links


MATLAB code for Gabor filters and Gabor feature extraction3D Gabor demonstrated with Mathematicapython implementation of log-Gabors for still images


Further reading

* * * * * * * Steerable Pyramids: *# Eero Simoncelli's page o
Steerable Pyramids
*#
PDF
)
Code
* {{DEFAULTSORT:Gabor Filter Linear filters Image processing Pattern recognition Articles with example MATLAB/Octave code Articles with example Python (programming language) code