Questions tagged [cross-correlation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
69 votes
8 answers
128k views

How do I implement cross-correlation to prove two audio files are similar?

I have to do cross correlation of two audio file to prove they are similar. I have taken the FFT of the two audio files and have their power spectrum values in separate arrays. How should I proceed ...
user avatar
55 votes
5 answers
54k views

What is the difference between convolution and cross-correlation?

I've found on multiple sites that convolution and cross-correlation are similar (including the tag wiki for convolution), but I didn't find anywhere how they differ. What is the difference between ...
Mien's user avatar
  • 815
22 votes
2 answers
6k views

Examples of Independent and uncorrelated data in real-life, and ways to measure/detect them

We always hear about this vector of data VS this other vector of data being independent from each other, or uncorrelated, etc, and while it is easy to come across the math regarding those two concepts,...
Spacey's user avatar
  • 9,807
15 votes
5 answers
8k views

Is up-sampling prior to cross-correlation useless?

Consider a simple case where two signals from two different sensors are cross-correlated, and the time-delay-of-arrival computed from the absissa of the peak of their cross-correlation function. Now ...
Spacey's user avatar
  • 9,807
15 votes
5 answers
15k views

Time delay estimation of oscilloscope signals using cross correlation

I have recorded 2 signals from an oscope. They look like this: I want to measure the time delay between them in Matlab. Each signal has 2000 samples with a sampling frequency of 2001000.5. The ...
Nick Sinas's user avatar
15 votes
2 answers
4k views

Finding symmetric regions/patterns in image

I have a set of images representing the mean curvature of a human back surface. What I want to do is to "scan" the image for points which have similar, reflected "counterparts" in some other part of ...
heltonbiker's user avatar
  • 1,097
11 votes
1 answer
2k views

Cross Correlation Matrix

In my group, we have developed an algorithm which shows abstract information from quantum mechanical systems as images. This way, given a quantum system, we obtain an associated image which has the ...
Javier Rodriguez Laguna's user avatar
11 votes
1 answer
2k views

What is the difference between normalized peak of correlation, versus peak of correlation divided by its average?

Given a template, and a signal, the question arises as to how similar the signal is to the template. Traditionally a simple correlation approach is used, whereby the template and a signal are cross-...
Spacey's user avatar
  • 9,807
10 votes
2 answers
7k views

Meaning of the Transpose of Convolution

I have an $n \times n$ asymmetric convolution kernel, $k(t_1,t_2)$. $k$ is zero everywhere except for in small regions near the corners. I also have an $n \times n$ image, $f$. Let $*$ denote ...
dranxo's user avatar
  • 295
10 votes
2 answers
8k views

Phase Correlation - Poor Performance on Noisy/Blurred Images?

I have successfully tested 1D phase correlation algorithm to determine vertical shift between two synthetic images. When I moved to real images, however, it is not able to detect translation at all (...
Libor's user avatar
  • 4,255
10 votes
1 answer
4k views

Synchronizing Two Audio Tracks

I would like to implement an algorithm that synchronizes two audio tracks. The two tracks are very similar; you can imagine they are two recordings of sound (not necessarily music) from two ...
Sinan Taifour's user avatar
10 votes
1 answer
8k views

Phase correlation vs. normalized cross-correlation

I asked this over at Mathematics Stack Exchange, but since this sort of lies on the border of the questions normally asked over there and the questions you see over here I'll ask it here as well. (As ...
Eric's user avatar
  • 101
9 votes
1 answer
7k views

Auto Correlation vs Cross Correlation vs Convolution and their applications

I know from wikipedia that auto correlation in done on the same signal while cross correlation is done on different signals.But what does this actually imply in terms of application.I can always apply ...
Chirag Ahuja's user avatar
9 votes
2 answers
4k views

Detecting a Signal Inside a Time Series Using MATLAB's $ \tt xcorr() $

I would like to find the exact replica of signal A in time series B. I am working with the simple toy example below, in which A is located starting at the 4th position in B. I thought that using <...
val's user avatar
  • 445
9 votes
1 answer
2k views

Directly compare subpixel shifts between two spectra — and get believable errors

I have two spectra of the same astronomical object. The essential question is this: How can I calculate the relative shift between these spectra and get an accurate error on that shift? Some more ...
JBWhitmore's user avatar
8 votes
1 answer
7k views

Measuring time delay of audio signals

Before anyone yells at me I fully realize that this question has been asked numerous times. I assure you that I've read through the existing questions and answers but I am still confused about part of ...
CaymanEss's user avatar
  • 275
8 votes
1 answer
9k views

Comparing multiple signals for similarity

I have multiple (between 2 and 100) signals and need to determine when a significant number diverge from the rest. We're exploring machine learning techniques, but we also want tackle this as a signal ...
John Strong's user avatar
7 votes
2 answers
844 views

Probability distribution of windowed cross-correlation

This question is in the context of time-delay estimation. Say I have a stationary Gaussian stochastic process $g$, and I know its autocorrelation function $R_g(\tau)$. To do time-delay estimation, I'm ...
Matt's user avatar
  • 913
7 votes
3 answers
6k views

GCC-PHAT (Generalized cross correlation MATLAB)

I've been trying to implement generalized cross correlation with a PHAT weighting function for a while now, and cannot get it to work. I have tried correlating using MATLAB's xcorr.m file, and it ...
CN railfan's user avatar
7 votes
2 answers
494 views

Using reference objects to estimate the point spread function?

I have a well-defined object and a clear image matrix of it. In subsequent frames the object moves, causing motion blur. I want to use the object as a reference to "guide" the deconvolution and ...
Ktuncer's user avatar
  • 816
7 votes
4 answers
637 views

Efficient calculation of correlation function every $N^{\rm th}$ point

I would like to calculate a long correlation function of length say, 1e6 points. I have a prior knowledge that the correlation peak will be in point k*1000. Is there an efficient way to apply this ...
Vlad Sokolik's user avatar
6 votes
4 answers
7k views

How to calculate a delay (correlation peak) between two signals with a precision smaller than the sampling period?

I would like to calculate a delay between two signals in MATLAB. Normally, I would do this with a cross-correlation (xcorr), and then calculate the position of the ...
BNJMNDDNN's user avatar
  • 225
6 votes
1 answer
3k views

What is the cross-correlation of a WSS signal and the LTI filtered signal?

I remember a result about the cross-correlation function of a stationary signal and that same signal, filtered through a linear time-invariant filter. There might have been an assumption that the ...
Andreas's user avatar
  • 1,968
6 votes
3 answers
459 views

Cross-correlation seems defined backwards

Suppose $f$ and $g$ are real. Why $$ C(\tau)=(f\star g)(\tau) = \int_{-\infty}^{\infty} f(t) g(t + \tau)dt \tag{1} $$ and not $$ C(\tau)=(f\star g)(\tau) = \int_{-\infty}^{\infty} f(t) g(t - \tau)dt\...
OverLordGoldDragon's user avatar
6 votes
1 answer
1k views

Ambiguous results of phase correlation in pattern recognition

We are using phase correlation to find pattern on image and what we get is 15% of results is spurious. Ours pattern has 32x32 pixels and image for research has 32x512 pixels. So we put Pattern to ...
Dawid D's user avatar
  • 163
6 votes
1 answer
435 views

Cross Power Spectral Density of Unevenly Sampled Data

Here's my problem. The input signals $x$ and $y$ will be having the time value aligned with each other. However, the data are not evenly sampled. I would like to calculate CPSD of both signals. The ...
SeeJay's user avatar
  • 161
6 votes
1 answer
1k views

Implementing a Matlab filter to cancel cross talk between two sensors

I have two sensors that have a cross talk between them. I would like to cancel the cross talk. For this I recorded two tracks, where sensor no.1 (called x1) has some input, and sensor no.2 (called x2) ...
user1017064's user avatar
5 votes
2 answers
15k views

Applications of Correlation in Signal Processing

There have been discussions on the differences between convolution and correlation, autocorrelation, cross-correlation, et al. In spite of looking at the visualizations, and understanding the formula ...
Raaj's user avatar
  • 295
5 votes
3 answers
14k views

Cross correlate a 2D array

I have a 2D array of eeg data with shape (64,512) - 64 electrodes, 512 timepoints I want to calculate the maximum cross correlation (irrespective of lag/time shift) between every single electrode, so ...
Simon's user avatar
  • 305
5 votes
2 answers
62k views

Python - Normalized cross-correlation to measure similarites in 2 images

I'm trying to measure per-pixel similarities in two images (same array shape and type) using Python. In many scientific papers (like this one), normalized cross-correlation is used. Here's an image ...
user avatar
5 votes
1 answer
1k views

Maximum cross-correlation coefficient value for time delay estimation

I am using cross-correlation for time delay estimation of two synchronized recordings ($x_1$ and $x_2$) of a fixed sound source from two different locations. I understand that the delay is associated ...
Reveille's user avatar
  • 153
5 votes
1 answer
2k views

Finding the Wiener filter transfer function

I am trying to understand the mechanism of finding the transfer function for a Wiener function. ...
SneakyMummin's user avatar
5 votes
1 answer
11k views

Computing cross-correlation of two images using OpenCV

I have a program that uses OpenCV to compute either the convolution or cross-correlation of an image with a specified kernel. I compute cross-correlation by setting the conjB flag to true when calling ...
orodbhen's user avatar
  • 501
5 votes
2 answers
1k views

Map time difference between two similar videos

Question: Is there any software, source-code, or well documented and easily implementable research (I am not afraid for a little bit of Python) to do the following: Take two similar videos from ...
Simon Streicher's user avatar
5 votes
2 answers
2k views

Using MATLAB `xcorr()` to Find a Signal Hidden Behind Noise

I am trying to develop some code to find a transient signal in a data set I have. Before I get there however I am trying to write code using simulated data. I first am creating a signal with a ...
PumpkinPie's user avatar
5 votes
2 answers
294 views

Coarse summary of various methods for detecting when a signal 'starts'

My question is basically in regards to how to detect when (in time) a signal 'starts', and it might also be called 'transient detection', or, as I have read in some papers regarding music, the 'onset' ...
Spacey's user avatar
  • 9,807
5 votes
3 answers
1k views

Estimate changing time lag between signals

Suppose I have two timeseries $x_1(t)$ and $x_2(t)$, shown in the image that I drew below. They look almost identical in general form, except some features are shifted slightly in time from one series ...
JesseC's user avatar
  • 51
5 votes
2 answers
1k views

How to calculate the phase shift AND time delay of non-periodic signals

Say I have two non-periodic signals, $f_1(t)$ and $f_2(t)$, with Fourier transforms $F_1(\omega)$ and $F_2(\omega)$. Basically, I need to line up $f_1(t)$ and $f_2(t)$ as close as possible, and I am ...
ursus432's user avatar
5 votes
2 answers
4k views

Correlation Using FFT / IFFT (Convolution in Frequency Domain) in Java

I try to find about the delay between two audio files using Cross Correlation in Java. I've already done this algorithm so far that i get a idea about how many samples is the delay. FFT x1 -> Zero ...
christopo's user avatar
5 votes
1 answer
887 views

What Does It Mean When Cross Correlation Between Two Images Occur at Negative Coordinates

I am using Matlab normxcorr2 to calculate the cross correlation between several images, something like what has been done here: in MATLAB documentation. There are some of the examples that I get ...
Miranda's user avatar
  • 153
5 votes
1 answer
701 views

Finding dependence between two sparse signals

I am new to signal processing and would really appreciate your help. happy to provide more context/details. In my research, I have a system that has many sensors $X_1, \ldots, X_N$ and using this ...
newmathwhodis's user avatar
5 votes
2 answers
1k views

Time Alignment of 2 Sensors Sampling the Same Signal with Different Hardware Delays

I have two radios sampling simultaneously, and I am trying to time-align their two signals (they will always start sampling at slightly different times with random delays due to hardware differences). ...
jstein123's user avatar
  • 155
4 votes
3 answers
1k views

2D Cross-Correlation using 1D FFT

I need to calculate cross correlation between 2 images which I read in 2 vectors, both of them uni-dimensional. As per my understanding I need to do the following operations: FFT(1D) on vector 1 and ...
user3253067's user avatar
4 votes
3 answers
826 views

How to decide whether a recording contains a signal of interest?

I am currently implementing an acoustic communication system in Matlab. For synchronization purposes, every transmission contains an upchirp preamble. The receiver uses cross-correlation to find the ...
F105's user avatar
  • 61
4 votes
3 answers
13k views

How do I get the phase angle from Cross Correlation?

Im trying to cross correlate two signals in matlab and get the phase difference between the signals. For cross correlation (the idea is to do it without xcorr) I used: ...
Learner12's user avatar
4 votes
4 answers
436 views

"cascaded" cross-correlation

so, first let's do this for the circular correlation case (it might be easier). let's say we have three real and periodic functions or signals $x(t)$, $y(t)$, $z(t)$ all with period $2 \pi$: $$ x(t+...
robert bristow-johnson's user avatar
4 votes
3 answers
1k views

Interpreting this plot cross-correlation

I have an input signal $x(t)$ that is a white Gaussian random signal with mean 0 and variance 1. The signal $y(t)$ is the output of a linear filter with impulse response $$h(t) = |\operatorname{sinc}(...
user35564's user avatar
4 votes
2 answers
2k views

How to preprocess signals prior cross-correlation?

Problem Description I have two devices which are measuring the same inputs and are using them to calculate the same (non-periodic) output signal. The process generating the inputs is deterministic. ...
lR8n6i's user avatar
  • 321
4 votes
1 answer
3k views

Cross-correlation or cross-covariance of non-zero mean signals

Cross-correlation for uniformly sampled signals is defined as [1] $$(f \star g)[n]\ \stackrel{\mathrm{def}}{=} \sum_{m=-\infty}^{\infty} f^*[m]\ g[m+n].$$ Cross-covariance for wide-sense stationary (...
Erik's user avatar
  • 143
4 votes
2 answers
912 views

Signals cross-correlation

I am trying to measure phase difference between two received waves which are recorded by two separate PC's (microphones). The two PC's starts recording at the same time, then I make a sine wave sound ...
Redan Hassoun's user avatar

1
2 3 4 5
9