41

Convolution is correlation with the filter rotated 180 degrees. This makes no difference, if the filter is symmetric, like a Gaussian, or a Laplacian. But it makes a whole lot of difference, when the filter is not symmetric, like a derivative. The reason we need convolution is that it is associative, while correlation, in general, is not. To see why this ...


10

One-dimensional version The one-dimensional version that you list won't work. When there is a large enough shift in images (more than one or two pixels in real-world images), there will be nothing relating the column pixels. For an example of this, try: I5 = rand(100,100)*255; I6 = zeros(100,100); I6(11:100,22:100) = I5(1:90,1:79); So that we have I5: ...


8

Yeah, it can mess you up pretty badly if you don't get the fundamentals right off the get-go. This is how I interpret correlation, and it has worked for me for what I do for a living. Let's start off with a relatively simple example. Take a look at the following figure (pulled from dspguide... this is actually a great online book for knowing the basics of ...


7

The (linear or aperiodic) convolution of two vectors $\mathbf x = (x[0], x[1], \ldots, x[N-1])$ and $\mathbf y = (y[0], y[1], \ldots, y[N-1])$ is a vector $$\mathbf z = {\mathbf x}\star {\mathbf y} = (z[0], z[1], \ldots, z[2N-1]).$$ On the other hand, their cross-correlation is a vector $$\mathbf w = {\mathbf x}\otimes {\mathbf y} = (w[-(N-1)], w[-(N-2)], \...


7

I can tell you of at least three applications related to audio. Auto-correlation can be used over a changing block (a collection of) many audio samples to find the pitch. Very useful for musical and speech related applications. Cross-correlation is used all the time in hearing research as a model for what the left and ear and the right ear use to figure ...


7

Let $\theta_a$ and $\theta_c$ respectively denote the maximum magnitudes of the off-peak or out-of-phase periodic autocorrelation functions and the periodic crosscorrelation functions of a set of $K$ sequences of length $N$ and energy $\sum_{n=0}^{N-1}|x[n]]|^2 = N$. In a seminal paper published in 1974, Welch proved that $$\max\big(\theta_a, \theta_c\big)\...


7

No. Quoting Wikipedia's article Independence (probability theory): If $X$ and $Y$ are independent random variables, then the expectation operator $\operatorname{E}$ has the property $$\operatorname{E}[X Y] = \operatorname{E}[X]\operatorname{E}[Y].$$ Consider your $X(t_1)$ and $Y(t_2)$ as $X$ and $Y$ in this answer. If both $\operatorname{E}[X] \ne ...


6

There a few commercial algorithms that do exactly that (Dolby Prologic, DTS Neo 6, Lexicon Logic 7, Bose Videostage, etc.). If your project has the funds, you can simply try to license one of those. The inner workings of these algorithms are rather complicated and typically a mixture of time domain and frequency domain feature extraction, some steering ...


6

[EDIT] In 1991, Nasir Ahmed wrote: "How I Came Up with the Discrete Cosine Transform". Interesting to read, on how he was inspired by Chebyshev polynomials, and on how he didn't get funding, for a tool at the heart of JPEG and MP3. Natural images are not very stationary, but locally, their covariance is often modeled by a first- or second-order ...


5

Why not just use something like the relative "error" between the two? For example, if your frequency magnitude responses are $G_1$ and $G_2$, then calculate: $$ ERR = \sum \left | G_1(n) - G_2(n) \right|^2 $$ and then normalize with respect to the reference, $G_1$: $$ NORMALIZED = \sum \left | G_1(n) - G_2(n) \right|^2 / \sum \left | G_1(n) \right|^2 $$ ...


5

It depends on the normalization that you perform on the data. Note that for computing the Pearson correlation coefficient you subtract the means of the signals. This is normally not the case if you simply compute a mean squared error between the signals, unless mean removal is part of your normalization procedure. I assume you compute the Pearson correlation ...


5

I am trying to answer your question about incoherence here rather than update my previous answer on another question of yours. Compressive sensing requires low coherent pairs. So the lower $\mu(\Phi,\Psi)$, the better. Actually is $\Phi$ is spike basis (identity matrix) with $\phi_k(t) = \delta(t-k)$, and $\Psi$ is Fourier basis with $\psi_j(t) = 1/\sqrt n ...


5

What are reasons to choose for cross-correlation or cross-covariance when comparing signals with non-zero mean? Well, part of the issue is that cross-correlation as defined in your equation: $$(f \star g)[n]\ \stackrel{\mathrm{def}}{=} \sum_{m=-\infty}^{\infty} f^*[m]\ g[m+n].$$ will not exist (or be infinite) if $f$ and $g$ have non-zero mean. So, in ...


5

$\underline{Prologue :}$ Let me ask you another question, How will you compare two complex numbers $U$ (a+jb) and $V$ (c+jd)? By comparing magnitude? Subtract them and take real part? Multiply them and compare? Since any complex number involves two entities ( one for magnitude |$z$| and other for argument $\theta$ ) any comparison involves comparison of ...


5

As your plot shows, the second form allows for the correlation peak to be negative. Now, what does a strong negative cross correlation mean? It means the signals are very similar, except one has a negative sign in front of it, i.e., $x_1 \approx -x_2$. Whether or not this makes sense depends a lot on the actual application. In the application you describe, ...


4

I understand your confusion because the equation is barely understandable from the information given in the book. It becomes more clear from the original paper by Classen and Meyr [1] from which it has been taken. They propose a two stage frequency offset estimation that consists of an acquistion stage and a tracking stage. The equation you've cited ...


4

For power signals $x(t)$ and $y(t)$, the function $$R_{xy}(\tau)=\lim_{T\rightarrow\infty}\frac{1}{2T}\int_{-T}^{T}x(t)\bar{y}(t+\tau)dt\tag{1}$$ is the cross-correlation of $x(t)$ and $y(t)$. So the expression you're asking about is the cross-correlation of $x(t)$ and $y(t)$ evaluated at lag $\tau=0$: $$R_{xy}(0)=\lim_{T\rightarrow\infty}\frac{1}{2T}\...


4

You are mixing up two different notions. Your random process is a collection of random variables $\{X(t)\colon -\infty < t < \infty\}$, one random variable for each time instant. The autocorrelation function of the process is $$R_X(t, \hat{t}) = E[X(t)X(\hat{t})], -\infty < t, \hat{t} < \infty$$ and is a two-dimensional function (meaning it has ...


4

Note that (discrete-time) convolution is defined as $$x_1[n]\star x_2[n]=\sum_kx_1[k]x_2[n-k]\tag{1}$$ and correlation is defined as $$r_{x_1,x_2}[n]=\sum_kx_1[k]x_2[k-n]\tag{2}$$ Comparing $(1)$ and $(2)$ we see that correlation can be written as the following convolution: $$r_{x_1,x_2}[n]=x_1[n]\star x_2[-n]\tag{3}$$ The $\mathcal{Z}$-transform of $...


4

edit: to be clear this answer describes why Lab can be described as a decorrelated color space. This does not imply that decorrelation is the main benefit of using Lab (see many answers on why Lab is useful) If you plot all the RGB colors of a standard RGB image of the natural world you will notice something (see below), the values tend to fall on a ...


4

HINT: What is the physical meaning of the autocorrelation evaluated at lag $\tau=0$?


4

Tl;DR version: You are not missing anything; finite-duration signals cannot be uncorrelated signals. If the crosscorrelation function $x\star y$ of $x$ and $y$ is zero everywhere, then the Fourier transform of $x\star y$, which is $X(f)Y^*(f)$ (or $X^*(f)Y(f)$ for left-handed folks), must also have value $0$ for all $f$. But, finite-duration signals have ...


3

A relatively simple application where correlation is used is in determining timing of a communications signal. A known synchronization signal will be sent periodically so that the receiver can use it as a point of reference. How does the receiver use it as a point of reference? It correlates the incoming signal stream against the known sequence, and when ...


3

I cant add comment due to low reputation. I think you misunderstood @lennon310's meaning. I reviewed his answer in the link, he treated Phi as a row selection matrix. @lennon310, please consider change your word 'rectangular identity'. I know what you mean, but that is not called identity matrix. Phi (in his context) is something like 0 1 0 0 0 0 0 0 0 ...


3

With known time scaling, you can resample to a common rate and then cross-correlate. It is natural to think you might need to go to the higher of the two rates, but that does not increase information beyond the lower rate, it only interpolates the information. This is analogous to zero-padding an FFT to interpolate the resolution of a peak. To determine ...


3

Sums of discrete cosines are good candidates because they're bound to repeat after a finite number of samples. In fact, anything that repeats after some finite number of samples is the most predictable thing in the world because you can predict the entire thing from just a handful of samples. In fact, the converse of this statement is true, i.e. anything ...


3

These terms exist mainly for historical reasons. In signal processing the signal is a one-dimensional function of time. So people talk about the time domain vs. the frequency domain. On the other hand, in image processing you are looking at a 2D function of $x$ and $y$, and there is no notion of time. Instead your are talking about spatial frequencies. ...


3

This question is plagued by bad notation that the OP is unwilling to abandon because, unfortunately, his book uses it. This greatly impedes his understanding of the concepts. Case 1: First convolution equation example: $$ h[k] * h^*[-k] = \sum_{n=-\infty}^{\infty} h[n] \ h^*[n+k] $$ The way I got the right hand side, was: 1) Make the $h$'s ...


3

I would use correlation for simple and small data. If your data is large though, I would think about using feature extraction via ICA or PCA analysis, and then compare the features via correlation. The problem with correlation is scale. Look at the image in the URL below: Correlation examples 80% is pretty similar in my imagination, but in correlation it ...


3

This is very late, but maybe it's worth it anyway... The time-scale plane is not the same as the time-frequency plane, although it might be useful as well. Signals at different places in the time scale plane are related by $x(t) \rightarrow x(\Delta s(t-\Delta t))$, where $\Delta s$ moves you up (or down) in scale and $\Delta t$ shifts you in time. The ...


Only top voted, non community-wiki answers of a minimum length are eligible