LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cross Correlation?


 


@GybrushThreepwood wrote:

 

 

Here the test images: left up: base signal (A) the lines mark the part of the part i use as pattern (up right / part of A) to detect.. but i cant see any peak in the correlation (down left).. I just see the same base signal... smoothed. (image left down) I then tried to split the base signal to loop the correlation with the pattern signal at same array length (down right). but the result seems similar. 

 

GybrushThreepwood_0-1583936201406.png

I got stuck with this. 😐 maybe someone can help?

 

 


attach your actual .vi and some sample data

 

 

@GybrushThreepwood wrote:

 

I want to use that feature for a kind of "pattern recognition". So I thought, if I just use a smaller part of signal A and corellate it with A itself, I should get a position with the highest correlation peak where this small part best fits to the rest of A? Is that correct too, or am I missing something?

 


That depends on how similar your template is to the input data:

cross correlation similarity_sliding-window_pos2.png

 

cross correlation similarity_sliding-window.png

 

0 Kudos
Message 11 of 13
(857 Views)

Hi alexderjuengere,

 

I think I got it. Xcorr just gives out the results for the whole data set X and Y. If I just search a small part of X it won't work, cause it don't fit to the whole data set.

 

I tried to loop the small dataset "manually" and just calculated the correlation coefficient each time. Then the result was good. It was 1 when the subset was found. Unfortunately this takes quite long cause it's shift-looping for each point of the long data set. Thought there would be a faster method.

 

Thanks anyway.

0 Kudos
Message 12 of 13
(815 Views)

I don't quite understand what you're after, but my first thought is to make an FFT on both signals and compare those.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 13 of 13
(809 Views)