In signal processing, crosscorrelation is a measure of similarity of two series as a function of the lag of one relative to the other. This is also known as a sliding dot product or sliding innerproduct. It is commonly used for searching a long signal for a shorter, known feature. It has applications in pattern recognition, single particle analysis, electron tomography, averaging, cryptanalysis, and neurophysiology.
For continuous functions f and g, the crosscorrelation is defined as:

(f \star g)(\tau)\ \stackrel{\mathrm{def}}{=} \int_{\infty}^{\infty} f^*(t)\ g(t+\tau)\,dt,
where f^* denotes the complex conjugate of f and \tau is the lag.
Similarly, for discrete functions, the crosscorrelation is defined as:

(f \star g)[n]\ \stackrel{\mathrm{def}}{=} \sum_{m=\infty}^{\infty} f^*[m]\ g[m+n].
The crosscorrelation is similar in nature to the convolution of two functions.
In an autocorrelation, which is the crosscorrelation of a signal with itself, there will always be a peak at a lag of zero, and its size will be the signal power.
In probability and statistics, the term crosscorrelations is used for referring to the correlations between the entries of two random vectors X and Y, while the autocorrelations of a random vector X are considered to be the correlations between the entries of X itself, those forming the correlation matrix (matrix of correlations) of X. This is analogous to the distinction between autocovariance of a random vector and crosscovariance of two random vectors. One more distinction to point out is that in probability and statistics the definition of correlation always includes a standardising factor in such a way that correlations have values between −1 and +1.
If X and Y are two independent random variables with probability density functions f and g, respectively, then the probability density of the difference Y  X is formally given by the crosscorrelation (in the signalprocessing sense) f \star g; however this terminology is not used in probability and statistics. In contrast, the convolution f * g (equivalent to the crosscorrelation of f(t) and g(−t) ) gives the probability density function of the sum X + Y.
Contents

Explanation 1

Properties 2

Time series analysis 3

Time delay analysis 4

Normalized crosscorrelation 5

Nonlinear systems 6

See also 7

References 8

Further reading 9

External links 10
Explanation
As an example, consider two real valued functions f and g differing only by an unknown shift along the xaxis. One can use the crosscorrelation to find how much g must be shifted along the xaxis to make it identical to f. The formula essentially slides the g function along the xaxis, calculating the integral of their product at each position. When the functions match, the value of (f\star g) is maximized. This is because when peaks (positive areas) are aligned, they make a large contribution to the integral. Similarly, when troughs (negative areas) align, they also make a positive contribution to the integral because the product of two negative numbers is positive.
With complexvalued functions f and g, taking the conjugate of f ensures that aligned peaks (or aligned troughs) with imaginary components will contribute positively to the integral.
In econometrics, lagged crosscorrelation is sometimes referred to as crossautocorrelation.^{[1]}
Properties

The crosscorrelation of functions f(t) and g(t) is equivalent to the convolution of f^{*}(−t) and g(t). That is:


f\star g = f^*(t)*g.

If both f and g are Hermitian, then f \star g = g \star f.

(f\star g)\star(f\star g)=(f\star f)\star (g\star g).


\mathcal{F}\{f\star g\}=(\mathcal{F}\{f\})^* \cdot \mathcal{F}\{g\},

where \mathcal{F} denotes the Fourier transform, and an asterisk again indicates the complex conjugate. Coupled with fast Fourier transform algorithms, this property is often exploited for the efficient numerical computation of crosscorrelations (see circular crosscorrelation).

The crosscorrelation of a convolution of f and h with a function g is the convolution of the crosscorrelation of f and g with the kernel h:


(f * h) \star g = h()*(f \star g).
Time series analysis
In time series analysis, as applied in statistics and signal processing, the crosscorrelation between two time series describes the normalized crosscovariance function.
Let (X_t,Y_t) represent a pair of stochastic processes that are jointly widesense stationary. Then the crosscovariance and the crosscorrelation are given by

crosscovariance

\gamma_{XY}(\tau) = \operatorname{E}[(X_t  \mu_X)(Y_{t+\tau}  \mu_Y)],

crosscorrelation

\rho_{XY}(\tau) = \operatorname{E}[ (X_t\mu_X)\,(Y_{t+\tau}\mu_Y)]/(\sigma_{X} \sigma_{Y}),

where \mu_X and \sigma_X are the mean and standard deviation of the process (X_t), which are constant over time due to stationarity; and similarly for (Y_t), respectively. That the crosscovariance and crosscorrelation are independent of t is precisely the additional information (beyond being individually widesense stationary) conveyed by the requirement that (X_t,Y_t) are jointly widesense stationary.
The crosscorrelation of a pair of jointly wide sense stationary stochastic process can be estimated by averaging the product of samples measured from one process and samples measured from the other (and its time shifts). The samples included in the average can be an arbitrary subset of all the samples in the signal (e.g., samples within a finite time window or a subsampling of one of the signals). For a large number of samples, the average converges to the true crosscorrelation.
Time delay analysis
Crosscorrelations are useful for determining the time delay between two signals, e.g. for determining time delays for the propagation of acoustic signals across a microphone array.^{[2]}^{[3]} After calculating the crosscorrelation between the two signals, the maximum (or minimum if the signals are negatively correlated) of the crosscorrelation function indicates the point in time where the signals are best aligned, i.e. the time delay between the two signals is determined by the argument of the maximum, or arg max of the crosscorrelation, as in

\tau_\mathrm{delay}=\underset{t}{\operatorname{arg\,max}}((f \star g)(t))
Normalized crosscorrelation
For imageprocessing applications in which the brightness of the image and template can vary due to lighting and exposure conditions, the images can be first normalized. This is typically done at every step by subtracting the mean and dividing by the standard deviation. That is, the crosscorrelation of a template, t(x,y) with a subimage f(x,y) is

\frac{1}{n} \sum_{x,y}\frac{(f(x,y)  \overline{f})(t(x,y)  \overline{t})}{\sigma_f \sigma_t}.
where n is the number of pixels in t(x,y) and f(x,y), \overline{f} is the average of f and \sigma_f is standard deviation of f. In functional analysis terms, this can be thought of as the dot product of two normalized vectors. That is, if

F(x,y) = f(x,y)  \overline{f}
and

T(x,y) = t(x,y)  \overline{t}
then the above sum is equal to

\left\langle\frac{F}{\F\},\frac{T}{\T\}\right\rangle
where \langle\cdot,\cdot\rangle is the inner product and \\cdot\ is the L² norm. Thus, if f and t are real matrices, their normalized crosscorrelation equals the cosine of the angle between the unit vectors F and T, being thus 1 if and only if F equals T multiplied by a positive scalar.
Normalized correlation is one of the methods used for template matching, a process used for finding incidences of a pattern or object within an image. It is also the 2dimensional version of Pearson productmoment correlation coefficient.
Nonlinear systems
Caution must be applied when using cross correlation for nonlinear systems. In certain circumstances, which depend on the properties of the input, cross correlation between the input and output of a system with nonlinear dynamics can be completely blind to certain nonlinear effects.^{[4]} This problem arises because some quadratic moments can equal zero and this can incorrectly suggest that there is little "correlation" (in the sense of statistical dependence) between two signals, when in fact the two signals are strongly related by nonlinear dynamics.
See also
References

^ Campbell; Lo; MacKinlay (1996). The Econometrics of Financial Markets. NJ: Princeton University Press.

^ Rhudy, Matthew; Brian Bucci; Jeffrey Vipperman; Jeffrey Allanach; Bruce Abraham (November 2009). "Microphone Array Analysis Methods Using CrossCorrelations". Proceedings of 2009 ASME International Mechanical Engineering Congress, Lake Buena Vista, FL.

^ Rhudy, Matthew (November 2009). "Real Time Implementation of a Military Impulse Classifier". University of Pittsburgh, Master's Thesis.

^ Billings, S. A. (2013). Nonlinear System Identification: NARMAX Methods in the Time, Frequency, and SpatioTemporal Domains. Wiley.
Further reading

Tahmasebi, Pejman; Hezarkhani, Ardeshir; Sahimi, Muhammad (2012). "Multiplepoint geostatistical modeling based on the crosscorrelation functions". Computational Geosciences 16 (3): 779–797.
External links

Cross Correlation from Mathworld

http://scribblethink.org/Work/nvisionInterface/nip.html

http://www.phys.ufl.edu/LIGO/stochastic/sign05.pdf

http://www.staff.ncl.ac.uk/oliver.hinton/eee305/Chapter6.pdf
This article was sourced from Creative Commons AttributionShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, EGovernment Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a nonprofit organization.