Questions tagged [cross-correlation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
60
votes
8answers
95k 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 ...
49
votes
4answers
43k 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 ...
20
votes
2answers
5k 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,...
14
votes
2answers
3k 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 ...
12
votes
5answers
6k 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 ...
12
votes
5answers
14k 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 ...
10
votes
1answer
1k 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-...
9
votes
2answers
7k 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 (...
9
votes
1answer
6k 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 ...
9
votes
1answer
6k 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 ...
9
votes
1answer
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 ...
9
votes
1answer
3k 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 ...
8
votes
1answer
4k 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 ...
6
votes
4answers
4k 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 ...
6
votes
2answers
749 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 ...
6
votes
2answers
3k 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 <...
6
votes
1answer
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 ...
6
votes
1answer
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) ...
6
votes
2answers
457 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 ...
5
votes
1answer
2k 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 ...
5
votes
1answer
1k views

Finding the Wiener filter transfer function

I am trying to understand the mechanism of finding the transfer function for a Wiener function. ...
5
votes
2answers
265 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' ...
5
votes
1answer
367 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 ...
5
votes
2answers
380 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 ...
5
votes
2answers
814 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 ...
5
votes
1answer
435 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 ...
4
votes
3answers
8k 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: ...
4
votes
2answers
1k 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. ...
4
votes
1answer
2k 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 (...
4
votes
1answer
571 views

How is cross-correlation related with orthogonality?

In linear prediction we can say that in case of optimum linear predictor the error with be orthogonal to data. And when we derive minimum mean square error for $\underline{y} = \mathbf{a}\underline{x} ...
4
votes
2answers
25k 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 ...
4
votes
2answers
1k views

Subtracting Original Audio Signal

here is my scenario: one speaker is sending a chirp, and a microphone is recording it as well as all following echoes. The function of the chirp is already know. My goal: subtract the original chirp ...
4
votes
1answer
223 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 ...
4
votes
1answer
6k 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 ...
4
votes
3answers
3k views

Cross correlation with short or non periodic signals?

I am a total newbe to signal processing and i have a problem which may be quite trivial to most of you guys. I want to align two short sensor signals (speaking of max. 1000 samples recorded with ...
4
votes
1answer
310 views

Direct Correlation (DC) Time Delay Estimation: Variance Keeps Decreasing for Increasing SNR?

I'm trying to reproduce the results from this paper "Discrete time techniques for Time Delay Estimation" doi:10.1109/78.193195, for both the correlation and Least Squares. I've generated a random (...
4
votes
1answer
3k views

Correlation of two signals at different sample rate

I have a signal $X$ and I want to find signal $Y$ in $X$, I can achieve this by cross-correlation. Signal $X$ is sampled at $8000\textrm{ Hz}$, and $Y$ signal is sampled at $44100\textrm{ Hz}$. My ...
4
votes
3answers
780 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 ...
4
votes
2answers
4k 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 ...
4
votes
1answer
262 views

Reliability of normalized cross-correlation with high lags

Say you have two signals with 100 data points in each signal. Then there are 20 time lags where the computation of the normalized cross-correlation between those signals only considers 10 or less ...
4
votes
1answer
104 views

Getting error in fit

I was wondering if anyone had run into the problem of trying to estimate errors in their signal processing on spectroscopic data. I know that many people use spectroscopic techniques to estimate ...
4
votes
1answer
745 views

Time delay estimation in low SNR

So I am interested in finding delay between two noisy narrowband signals,for example, two arterial pulse waveform. I can easily get a correct estimate of delay using cross-correlation method, but it ...
3
votes
2answers
272 views

Is maximizing hamming distance the same as minimizing correlation?

For the design of an error correcting code, I might wish to maximize the distance between the codewords $\sum a_i \oplus b_i$. For spreading sequences I'd like to minimize the cross-correlation at $t=...
3
votes
2answers
502 views

Why is there a mismatch between normalized cross-correlation and perception for basic waveforms?

To my ears, sawtooth and square waves are more similar to each other than either one is to a triangle wave. However, when I compare their magnitude spectra against each other using normalized cross-...
3
votes
4answers
377 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+...
3
votes
2answers
710 views

Interpolating the peak of a cross-correlation using a centroid

Forgive me if this question is poorly worded, I'm not sure if centroid is the word to use here. Say I want to interpolate the peak of a cross-correlation function in order to get sub-sample delays. I ...
3
votes
2answers
12k 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 ...
3
votes
1answer
532 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 ...
3
votes
1answer
144 views

Strong (0,0) pixel among an otherwise normal cross correlation peak

I am working on an imagery registration problem via cross-correlation and am seeing a weird phenomena sometimes. First, I am pre-processing each image by subtracting the mean image brightness from ...
3
votes
1answer
1k 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 ...

1 2 3 4 5 6