## Forums Search for: Cross Correlation

## cross correlation

inI'm wondering if you can be of some help to me. I currently have two waveforms,waveform1 and waveform2 that I'm reading from my oscilloscope into...

I'm wondering if you can be of some help to me. I currently have two waveforms,waveform1 and waveform2 that I'm reading from my oscilloscope into Matlab. I want to find the times in waveform2 that a match for waveform1 occurs. I want a 'correlation spike' to occur in my resultant waveform every time Matlab finds a match for waveform1 in waveform2.However at the moment this is not occuring. Does t...

## result of cross correlation

inHi, I quiet confuse with using 'xcorr' function. I understand that there is a problem of wrap-around effect so it gives the result of N+M-1,...

Hi, I quiet confuse with using 'xcorr' function. I understand that there is a problem of wrap-around effect so it gives the result of N+M-1, but I don't understand how to observe that the result of the correlation occurs at the right place. For example, if I have signal x(t) = 1024 numbers (length) and same for y(t) but the later is padded to zero and I copy 501:532 of x(t) into y(t) I shoul...

## cross correlation lag scale

inHi, I am currently using the xcorr function in Matlab to correlate two waveforms(plotted as voltage v's time). Both these waveforms have...

Hi, I am currently using the xcorr function in Matlab to correlate two waveforms(plotted as voltage v's time). Both these waveforms have 2500 samples. When I use the xcorr function, the resultant waveform has 5000 samples (as expected). What I want to know is how do I scale these 5000 samples in order to get the lag time(between the two wavefroms)? ie. when matlab finds the best match for wavefor...

## cross correlation gives wrong peak location

Hi guys, I have a problem of doing cross correlation in matlab. What I'm trying to do is calculate the similarity of image in order to get a...

Hi guys, I have a problem of doing cross correlation in matlab. What I'm trying to do is calculate the similarity of image in order to get a location of mis matches. I do it by 'xcorr' function and compare with FFT correlation so as to compare the result. What I have done is about to be just fine, but I just realised that when I took a very short signal to be correlated with another signal, the...

## Cross Correlation of 2 vectors of different lengths

inDear all, My purpose is to determine if there is a correlation between two signals. I need to find if they are correlated with a positive...

Dear all, My purpose is to determine if there is a correlation between two signals. I need to find if they are correlated with a positive correlation close to 1 or an opposite one close to -1. How do I normalize the cross-correlation coefficient when the 2 signals have different lengths? I would like to perform a cross correlation of two finite length sequences ?x? and ?y?. Lengt

## normalized cross correlation

Hello I have done a cross correlation but still have aproblem of getting wrong result when two signals is differnent in length. I solved the...

Hello I have done a cross correlation but still have aproblem of getting wrong result when two signals is differnent in length. I solved the problem by padding zeros to the shorter one to have equal length with another signal, but the problem still exist. I have found out that I need to normalized the cross correlation which I don't know how to do so. I have found out an equation, rxy(k)=E...

## shift the 2D cross correlation result

Hi, Could anybody tell me how to shift the 2D cross correlation result in matlab. For example, in 1D cross correlation, the result of...

Hi, Could anybody tell me how to shift the 2D cross correlation result in matlab. For example, in 1D cross correlation, the result of cross correlation will be twice of the maximum signal length minus 1, which then the first half of the graph will be padded to zero. The result will spread from right to left according to the length of signal to be correlated. From this, we can plot the graph bac...

## normalised cross correlation by fft

inHi, I have got a problem doing 2D normalised cross correlation by FFT. The normal 2D cross correlation seems very time consuming for long...

Hi, I have got a problem doing 2D normalised cross correlation by FFT. The normal 2D cross correlation seems very time consuming for long signal so I tried to use FFT. I can now get the equal result of cross correlation both by equation and by FFT, but I can not do the normalisation to get the result of FFT equals to the "normxcorr2" from matlab function. Thanks, Sangthong

## cross-correlation of Walsh-Hadamard sequences overlayed with a PN sequence

inThe cross-correlation of a few Walsh-Hadamard sequences are very good, nearly ideal, but some are bad having very large sidelobes. Does somebody...

The cross-correlation of a few Walsh-Hadamard sequences are very good, nearly ideal, but some are bad having very large sidelobes. Does somebody know a systematic way to construct, or even a good table of, a PN sequence that when overlayed with Walsh-Hadamard sequences, say the 64-ary ones, the resulting 64 sequences will have, if not ideal, at least uniformly low cross-correlation? Thank ...

## regarding correlation and cross-correlation

inHi, this is devika , i want some clear information regarding the correlation and cross-correlation . if there are two sine waves how can...

Hi, this is devika , i want some clear information regarding the correlation and cross-correlation . if there are two sine waves how can we see taht they are correlated and cross-correlated . please give some examples with there wave forms examples and give some information regarding how to calculate the correlation and cross- correlation as per equations(software view) please r...

## spectral peak-estimation by cross-correlation

inHello comp.dsp readers, I am working on a plugin that involves estimation of spectral peaks (frequency and magnitude - basically the whole...

Hello comp.dsp readers, I am working on a plugin that involves estimation of spectral peaks (frequency and magnitude - basically the whole thing is phase-vocoder based). I first tried to use parabolic interpolation (by taking the maximum of the parabola to calculate the frequency and amplitude of sinusoids I want to track). In most cases that works sufficiently well, but when sinusoi...

## Correlation

inI have 2 complex signals I need to find the time delay between them. Do I use the amplitude of each in cross-correlation or I use the...

I have 2 complex signals I need to find the time delay between them. Do I use the amplitude of each in cross-correlation or I use the cross-correlation of the complex signals. What are the advantages and disadvantages. Regards Tom

## anyone have an answer to this?

inHi there, Just wondering if this question was answered...I know it is an old post, but just taking a long shot here. Essentially I am getting...

Hi there, Just wondering if this question was answered...I know it is an old post, but just taking a long shot here. Essentially I am getting the same outcome...specifically, in matlab, I can generate an appropriate correlation plot, and retrieve the correct delay with xcorr...as well as using the TF method : max(ifft(fft(x1).*conj(fft(x2))), i.e. through regular cross correlation. However, ...

## Cross correlation in signal analysis

inHello, I'm trying to gain understanding of cross correlation practical use. My textbook (among others) define auto and cross correlation...

Hello, I'm trying to gain understanding of cross correlation practical use. My textbook (among others) define auto and cross correlation and states they are both widely used in signal processing and detecting signals with noise. So, I simply want to learn how to use it effectively. I made simple script in MATLAB: t = 0:0.1:10; %time x = 2*sin(t); plot(x) z = randn(1,length(t)); hold on;...

## Re: Cross correlation in signal analysis

Hmm, I'm not very familar with your examples. Basically I was making little experiment in Matlab. Since I learned about correlation, I tried...

Hmm, I'm not very familar with your examples. Basically I was making little experiment in Matlab. Since I learned about correlation, I tried to see what I can do with it. So I generated on strictly deterministic signal sinusoid and other stohastic signal using function randn. Since these two signals are totaly uncorrelated I would exect that cross corelation is very small. And in fact it is ...

## different resolution on photographic correlation

inHi, guys I've got a question on photographic correlation for doing inspection by cross correlation. I can find sub-image inside the original...

Hi, guys I've got a question on photographic correlation for doing inspection by cross correlation. I can find sub-image inside the original image, however, I don't have an idea if the images have been taken at far different distances, so the resolution of the big image and sub-image are different. Can anybody tell me theoratically on this? thank you very much. Sangthong

## Normalization in cross-correlation (image processing)

inHi, In connection with pattern identification in images, cross-correlation between the image and a template matrix is often used. Is there...

Hi, In connection with pattern identification in images, cross-correlation between the image and a template matrix is often used. Is there any reason why the means are substracted from the elements before the multiplying them? If the only purpose is to detect similarity, the scaling seems unessecery. Thanks in advance

## Energy detector

inWe do have a 32-bit floating point processor. ADSP 21160. I have used energy detection because I thought it was the best for detecting...

We do have a 32-bit floating point processor. ADSP 21160. I have used energy detection because I thought it was the best for detecting unknown signals as opposed to cross-correlation in active mode. So I may be wrong. Is it so?

## normalised cross correlation by FFT

inHi, I have a problem of doing normalised cross correlation by FFT, which the result doesn't satisfy with the result from the one from time...

Hi, I have a problem of doing normalised cross correlation by FFT, which the result doesn't satisfy with the result from the one from time domain method and I don't know where it goes wrong. From my understanding, this is the cross covariance in frequency domain, which gives me the correct result. (If there are signals x and y) 1) Do FFT of x 2) Do FFT of y 3) Conjugates 1) or 2) 4) M...

## Regarding comparison of audio quality

inHi, I m working on QMF filters wherein I split the input audio into different bands and then reconstruct them. I wanted to know how can I compare...

Hi, I m working on QMF filters wherein I split the input audio into different bands and then reconstruct them. I wanted to know how can I compare the quality of the input audio and the reconstructed audio. Right now I m using mean square error which I feel is not sensible because the more the filter length I use more is the error that is showing up. Can I use cross correlation to compare the q...