LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cross-correlation

Hi
I am using LabView 7.1.
I am doing the cross-correlation of 2 signals. The y-axis is pressure amplitude.
I used Read LVM to feed the saved signals to the cross-correlation vi as shown in attachment.
The chart shows the correlation value from 0 to 6. However I think it should come in the range from -1 to +1.
I will highly appreciate for any suggestions over this problem.

Thanks
Download All
Message 1 of 7
(3,948 Views)
hi!
   what you refer to is normalized, while cross-correlation function can return any number, also infinite (think about 2 constant functions).

graziano


0 Kudos
Message 2 of 7
(3,942 Views)
hi graziano
Thanks for your reply.
Did you mean to say to normalize the signal by dividing by sqrt(x*y)?
Am I using the correct way to find the cross correlation function?

Thanks
Pramod
0 Kudos
Message 3 of 7
(3,935 Views)
Hi!
   I don't know how this function can be normalized, though I suppose there's a way, but I suppose it is more complicate than you said....

   I think you're calculating cross-correlation the right way, the function is quite simple....

graziano
0 Kudos
Message 4 of 7
(3,933 Views)

Pramod,

I'm in a similar situation right now. I'm looking for +1 to -1 values...did you determine what the solution was? 

 

T

Tyler C. | Certified LabVIEW Associate Developer

0 Kudos
Message 5 of 7
(3,551 Views)

Hi pbsalunkhe,

 

A popular definition for the Normalized Cross-Correlation is:

sum(A(i)B(i))/sqrt(sum(A(i)^2) sum(B(i)^2))

 

A & B are the two signals you would like to calculate. Hope this helps.

Message Edited by strong@ni on 09-17-2009 04:57 AM
Message Edited by strong@ni on 09-17-2009 04:58 AM
0 Kudos
Message 6 of 7
(3,528 Views)

That formula only works if the local mean and standard deviation of the signal is constant.  The best reference for Fast Normalized Correlation is:

J. P. Lewis  Fast Normalized Cross-Correlation. Vision Interface 1995. (PDF)

 

See also this thread which relates to 2D cross-correlation, but the same code I wrote is easily modified for 1D NCC.

 

Cheers ~ Greg

 

0 Kudos
Message 7 of 7
(3,509 Views)