The name Top-hat filter refers to several
real-space or
Fourier space
In physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency, rather than time. Put simply, a time-domain graph shows how a s ...
filtering techniques (not to be confused with the
top-hat transform
In mathematical morphology and digital image processing, a top-hat transform is an operation that extracts small elements and details from given images. There exist two types of top-hat transform: the ''white top-hat transform'' is defined as the ...
). The name top-hat originates from the shape of the filter, which is a
rectangle function
The rectangular function (also known as the rectangle function, rect function, Pi function, Heaviside Pi function, gate function, unit pulse, or the normalized boxcar function) is defined as
\operatorname(t) = \Pi(t) =
\left\{\begin{array}{r ...
, when viewed in the domain in which the filter is constructed.
Real space
In real-space the filter performs nearest-neighbour filtering, incorporating components from neighbouring y-function values. However, despite their ease of implementation their practical use is limited as the real-space representation of a top-hat filter is the
sinc
In mathematics, physics and engineering, the sinc function, denoted by , has two forms, normalized and unnormalized..
In mathematics, the historical unnormalized sinc function is defined for by
\operatornamex = \frac.
Alternatively, the u ...
function, which has the often undesirable effect of incorporating non-local frequencies.
Analogue implementations
Exact non-digital implementations are only theoretically possible. Top-hat filters can be constructed by chaining theoretical low-band and high-band filters. In practice, an approximate top-hat filter can be constructed in analogue hardware using approximate low-band and high-band filters.
Fourier space
In Fourier space, a top hat filter selects a band of signal of desired frequency by the specification of a lower and upper bounding frequencies. Top-hat filters are particularly easy to implement digitally.
Related functions
The top hat function can be generated by differentiating a linear ramp function of width
. The limit of
then becomes the
Dirac delta function
In mathematics, the Dirac delta distribution ( distribution), also known as the unit impulse, is a generalized function or distribution over the real numbers, whose value is zero everywhere except at zero, and whose integral over the entire ...
. Its real-space form is the same as the
moving average
In statistics, a moving average (rolling average or running average) is a calculation to analyze data points by creating a series of averages of different subsets of the full data set. It is also called a moving mean (MM) or rolling mean and is ...
, with the exception of not introducing a shift in the output function.
See also
*
Boxcar averager
*
Rectangular function
The rectangular function (also known as the rectangle function, rect function, Pi function, Heaviside Pi function, gate function, unit pulse, or the normalized boxcar function) is defined as
\operatorname(t) = \Pi(t) =
\left\{\begin{array}{r ...
*
Step function
In mathematics, a function on the real numbers is called a step function if it can be written as a finite linear combination of indicator functions of intervals. Informally speaking, a step function is a piecewise constant function having only ...
*
Boxcar function
References
{{Unreferenced, date=July 2008
Linear filters